Struct atomic_refcell::AtomicRefCell
[−]
[src]
pub struct AtomicRefCell<T: ?Sized> { /* fields omitted */ }
A threadsafe analogue to RefCell.
Methods
impl<T> AtomicRefCell<T>[src]
fn new(value: T) -> AtomicRefCell<T>
Creates a new AtomicRefCell containing value.
fn into_inner(self) -> T
Consumes the AtomicRefCell, returning the wrapped value.
impl<T: ?Sized> AtomicRefCell<T>[src]
fn borrow(&self) -> AtomicRef<T>
Immutably borrows the wrapped value.
fn borrow_mut(&self) -> AtomicRefMut<T>
Mutably borrows the wrapped value.
fn as_ptr(&self) -> *mut T
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
impl<T: ?Sized + Send + Sync> Send for AtomicRefCell<T>[src]
impl<T: ?Sized + Send + Sync> Sync for AtomicRefCell<T>[src]
impl<T: Clone> Clone for AtomicRefCell<T>[src]
fn clone(&self) -> AtomicRefCell<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<T: Default> Default for AtomicRefCell<T>[src]
fn default() -> AtomicRefCell<T>
Returns the "default value" for a type. Read more
impl<T: ?Sized + PartialEq> PartialEq for AtomicRefCell<T>[src]
fn eq(&self, other: &AtomicRefCell<T>) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl<T: ?Sized + Eq> Eq for AtomicRefCell<T>[src]
impl<T: ?Sized + PartialOrd> PartialOrd for AtomicRefCell<T>[src]
fn partial_cmp(&self, other: &AtomicRefCell<T>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<T: ?Sized + Ord> Ord for AtomicRefCell<T>[src]
fn cmp(&self, other: &AtomicRefCell<T>) -> Ordering
This method returns an Ordering between self and other. Read more
impl<T> From<T> for AtomicRefCell<T>[src]
fn from(t: T) -> AtomicRefCell<T>
Performs the conversion.