pub struct PredCell<T: ?Sized>(/* private fields */);Expand description
Cell over predicates
A wrapper around std::cell::Cell that allows predicates to be used to specify the contents of the cell.
Implementations§
Source§impl<T> PredCell<T>
impl<T> PredCell<T>
Sourcepub const fn new(v: T, _pred: Snapshot<Mapping<T, bool>>) -> Self
pub const fn new(v: T, _pred: Snapshot<Mapping<T, bool>>) -> Self
See the method Cell::new documentation.
Sourcepub fn swap(&self, other: &PredCell<T>)
pub fn swap(&self, other: &PredCell<T>)
See the method Cell::swap documentation.
Sourcepub const fn replace(&self, v: T) -> T
pub const fn replace(&self, v: T) -> T
See the method Cell::replace documentation.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
See the method Cell::into_inner documentation.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for PredCell<T>
impl<T> !RefUnwindSafe for PredCell<T>
impl<T> Send for PredCell<T>
impl<T> !Sync for PredCell<T>
impl<T> Unpin for PredCell<T>
impl<T> UnsafeUnpin for PredCell<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for PredCell<T>where
T: UnwindSafe + ?Sized,
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