pub struct Cell<T> { /* private fields */ }
Expand description
A checked version of std::cell::Cell
, implemented on top of
loom::cell::UnsafeCell
.
Unlike loom::cell::UnsafeCell
, this provides an API that’s
largely compatible with the standard counterpart.
Implementations§
Trait Implementations§
source§impl<T: Ord + Copy> Ord for Cell<T>
impl<T: Ord + Copy> Ord for Cell<T>
source§impl<T: PartialEq + Copy> PartialEq for Cell<T>
impl<T: PartialEq + Copy> PartialEq for Cell<T>
source§impl<T: PartialOrd + Copy> PartialOrd for Cell<T>
impl<T: PartialOrd + Copy> PartialOrd for Cell<T>
1.0.0 · source§fn 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: Eq + Copy> Eq for Cell<T>
Auto Trait Implementations§
impl<T> !Freeze for Cell<T>
impl<T> !RefUnwindSafe for Cell<T>
impl<T> Send for Cell<T>where
T: Send,
impl<T> !Sync for Cell<T>
impl<T> Unpin for Cell<T>where
T: Unpin,
impl<T> UnwindSafe for Cell<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more