typst_utils

Trait ArcExt

source
pub trait ArcExt<T> {
    // Required method
    fn take(self) -> T;
}
Expand description

Extra methods for Arc.

Required Methods§

source

fn take(self) -> T

Takes the inner value if there is exactly one strong reference and clones it otherwise.

Implementations on Foreign Types§

source§

impl<T: Clone> ArcExt<T> for Arc<T>

source§

fn take(self) -> T

Implementors§