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§
Sourcefn can_collect(&self) -> bool
fn can_collect(&self) -> bool
Is this handle unique or, if weak references are allowed, destroyed
Sourcefn can_collect_clone(&self) -> bool
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>
impl<T: ?Sized> CanCollect for Rc<T>
Source§fn can_collect(&self) -> bool
fn can_collect(&self) -> bool
Is this handle unique or, if weak references are allowed, destroyed
Source§fn can_collect_clone(&self) -> bool
fn can_collect_clone(&self) -> bool
Are there two strong copies or less of this handle?
Source§impl<T: ?Sized> CanCollect for Arc<T>
impl<T: ?Sized> CanCollect for Arc<T>
Source§fn can_collect(&self) -> bool
fn can_collect(&self) -> bool
Is this handle unique or, if weak references are allowed, destroyed
Source§fn can_collect_clone(&self) -> bool
fn can_collect_clone(&self) -> bool
Are there two strong copies or less of this handle?
Source§impl<T: ?Sized> CanCollect for Arc<T>
impl<T: ?Sized> CanCollect for Arc<T>
Source§fn can_collect(&self) -> bool
fn can_collect(&self) -> bool
Is this handle unique or, if weak references are allowed, destroyed
Source§fn can_collect_clone(&self) -> bool
fn can_collect_clone(&self) -> bool
Are there two strong copies or less of this handle?