Struct arc_cell::WeakCell
[−]
[src]
pub struct WeakCell<T> { /* fields omitted */ }
A Cell for containing a weak reference
Methods
impl<T> WeakCell<T>
[src]
fn new(value: Weak<T>) -> WeakCell<T>
Constructs the Cell with a value already inside
fn empty() -> WeakCell<T>
Construct the Cell with an empty Weak pointer. Upgrading this value will always return None.
fn get(&self) -> Weak<T>
Get the Weak pointer as it is at this moment
fn upgrade(&self) -> Option<Arc<T>>
Try to upgrade the Weak pointer as it is now into a Strong pointer
fn set(&self, value: Weak<T>) -> Weak<T>
Set a Weak pointer you currently have as the pointer in this cell
fn store(&self, value: &Arc<T>)
Downgrade a Strong pointer and store it in the cell
fn reset(&self) -> Weak<T>
Resets the stored value to be empty