[−][src]Struct atomic_refcell::AtomicRefCell
A threadsafe analogue to RefCell.
Fields
borrow: AtomicUsizevalue: UnsafeCell<T>Methods
impl<T> AtomicRefCell<T>[src]
pub fn new(value: T) -> AtomicRefCell<T>[src]
Creates a new AtomicRefCell containing value.
pub fn into_inner(self) -> T[src]
Consumes the AtomicRefCell, returning the wrapped value.
impl<T: ?Sized> AtomicRefCell<T>[src]
pub fn borrow(&self) -> AtomicRef<T>[src]
Immutably borrows the wrapped value.
pub fn borrow_mut(&self) -> AtomicRefMut<T>[src]
Mutably borrows the wrapped value.
pub fn as_ptr(&self) -> *mut T[src]
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 + Eq> Eq for AtomicRefCell<T>[src]
fn assert_receiver_is_total_eq(&self)1.0.0[src]
impl<T: Clone> Clone for AtomicRefCell<T>[src]
fn clone(&self) -> AtomicRefCell<T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: ?Sized + Send + Sync> Send for AtomicRefCell<T>[src]
impl<T: ?Sized + PartialOrd> PartialOrd<AtomicRefCell<T>> for AtomicRefCell<T>[src]
fn partial_cmp(&self, other: &AtomicRefCell<T>) -> Option<Ordering>[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl<T: ?Sized + PartialEq> PartialEq<AtomicRefCell<T>> for AtomicRefCell<T>[src]
fn eq(&self, other: &AtomicRefCell<T>) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl<T: ?Sized + Send + Sync> Sync for AtomicRefCell<T>[src]
impl<T: Default> Default for AtomicRefCell<T>[src]
fn default() -> AtomicRefCell<T>[src]
impl<T: ?Sized + Ord> Ord for AtomicRefCell<T>[src]
fn cmp(&self, other: &AtomicRefCell<T>) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<T> From<T> for AtomicRefCell<T>[src]
fn from(t: T) -> AtomicRefCell<T>[src]
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,