Struct atomic_refcell::AtomicRefCell [−][src]
pub struct AtomicRefCell<T: ?Sized> { /* fields omitted */ }
Expand description
A threadsafe analogue to RefCell.
Implementations
Creates a new AtomicRefCell
containing value
.
Consumes the AtomicRefCell
, returning the wrapped value.
Attempts to immutably borrow the wrapped value, but instead of panicking
on a failed borrow, returns Err
.
Mutably borrows the wrapped value.
Attempts to mutably borrow the wrapped value, but instead of panicking
on a failed borrow, returns Err
.
Returns a raw pointer to the underlying data in this cell.
External synchronization is needed to avoid data races when dereferencing the pointer.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more