Struct atomic_refcell::AtomicRefCell
source · pub struct AtomicRefCell<T: ?Sized> { /* private fields */ }
Expand description
A threadsafe analogue to RefCell.
Implementations
sourceimpl<T> AtomicRefCell<T>
impl<T> AtomicRefCell<T>
sourcepub fn new(value: T) -> AtomicRefCell<T>
pub fn new(value: T) -> AtomicRefCell<T>
Creates a new AtomicRefCell
containing value
.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the AtomicRefCell
, returning the wrapped value.
sourceimpl<T: ?Sized> AtomicRefCell<T>
impl<T: ?Sized> AtomicRefCell<T>
sourcepub fn borrow_mut(&self) -> AtomicRefMut<'_, T>
pub fn borrow_mut(&self) -> AtomicRefMut<'_, T>
Mutably borrows the wrapped value.
Trait Implementations
sourceimpl<T: Clone> Clone for AtomicRefCell<T>
impl<T: Clone> Clone for AtomicRefCell<T>
sourcefn clone(&self) -> AtomicRefCell<T>
fn clone(&self) -> AtomicRefCell<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: ?Sized + Debug> Debug for AtomicRefCell<T>
impl<T: ?Sized + Debug> Debug for AtomicRefCell<T>
sourceimpl<T: Default> Default for AtomicRefCell<T>
impl<T: Default> Default for AtomicRefCell<T>
sourcefn default() -> AtomicRefCell<T>
fn default() -> AtomicRefCell<T>
Returns the “default value” for a type. Read more
sourceimpl<T> From<T> for AtomicRefCell<T>
impl<T> From<T> for AtomicRefCell<T>
sourcefn from(t: T) -> AtomicRefCell<T>
fn from(t: T) -> AtomicRefCell<T>
Converts to this type from the input type.
sourceimpl<T: ?Sized + Ord> Ord for AtomicRefCell<T>
impl<T: ?Sized + Ord> Ord for AtomicRefCell<T>
sourceimpl<T: ?Sized + PartialEq> PartialEq<AtomicRefCell<T>> for AtomicRefCell<T>
impl<T: ?Sized + PartialEq> PartialEq<AtomicRefCell<T>> for AtomicRefCell<T>
sourcefn eq(&self, other: &AtomicRefCell<T>) -> bool
fn eq(&self, other: &AtomicRefCell<T>) -> bool
sourceimpl<T: ?Sized + PartialOrd> PartialOrd<AtomicRefCell<T>> for AtomicRefCell<T>
impl<T: ?Sized + PartialOrd> PartialOrd<AtomicRefCell<T>> for AtomicRefCell<T>
sourcefn partial_cmp(&self, other: &AtomicRefCell<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &AtomicRefCell<T>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: ?Sized + Eq> Eq for AtomicRefCell<T>
impl<T: ?Sized + Send + Sync> Send for AtomicRefCell<T>
impl<T: ?Sized + Send + Sync> Sync for AtomicRefCell<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for AtomicRefCell<T>
impl<T: ?Sized> Unpin for AtomicRefCell<T>where
T: Unpin,
impl<T: ?Sized> UnwindSafe for AtomicRefCell<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more