CanCollect

Trait CanCollect 

Source
pub trait CanCollect {
    // Provided methods
    fn can_collect(&self) -> bool { ... }
    fn can_collect_clone(&self) -> bool { ... }
}
Expand description

An object which can be garbage collected

Provided Methods§

Source

fn can_collect(&self) -> bool

Is this handle unique or, if weak references are allowed, destroyed

Source

fn can_collect_clone(&self) -> bool

Are there two strong copies or less of this handle?

Implementations on Foreign Types§

Source§

impl<T: ?Sized> CanCollect for Rc<T>

Source§

fn can_collect(&self) -> bool

Is this handle unique or, if weak references are allowed, destroyed

Source§

fn can_collect_clone(&self) -> bool

Are there two strong copies or less of this handle?

Source§

impl<T: ?Sized> CanCollect for Arc<T>

Source§

fn can_collect(&self) -> bool

Is this handle unique or, if weak references are allowed, destroyed

Source§

fn can_collect_clone(&self) -> bool

Are there two strong copies or less of this handle?

Source§

impl<T: ?Sized> CanCollect for Arc<T>

Source§

fn can_collect(&self) -> bool

Is this handle unique or, if weak references are allowed, destroyed

Source§

fn can_collect_clone(&self) -> bool

Are there two strong copies or less of this handle?

Implementors§

Source§

impl<A: Eq + Deref, P> CanCollect for CachedArr<A, P>