Skip to main content

ArcExt

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

fn take(self) -> T

Implementors§