Struct drying_paint::WatchedCell
source · pub struct WatchedCell<T: ?Sized> { /* private fields */ }
Expand description
A Watched value which provides interior mutability. This provides correct
behavior (triggering watch functions when changed) where Watched<Cell<T>>
would not, and should be slightly more performant than
RefCell<Watched<T>>
.
Implementations§
source§impl<T: ?Sized> WatchedCell<T>
impl<T: ?Sized> WatchedCell<T>
source§impl<T> WatchedCell<T>
impl<T> WatchedCell<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwraps the WatchedCell, returning the contained value
Trait Implementations§
source§impl<T: Copy> Clone for WatchedCell<T>
impl<T: Copy> Clone for WatchedCell<T>
source§impl<T: Default + ?Sized> Default for WatchedCell<T>
impl<T: Default + ?Sized> Default for WatchedCell<T>
source§fn default() -> WatchedCell<T>
fn default() -> WatchedCell<T>
Returns the “default value” for a type. Read more
source§impl<T> From<T> for WatchedCell<T>
impl<T> From<T> for WatchedCell<T>
source§impl<'a, T> WatchedValueCore<'static, DefaultOwner> for &'a WatchedCell<T>
impl<'a, T> WatchedValueCore<'static, DefaultOwner> for &'a WatchedCell<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for WatchedCell<T>
impl<T> !Send for WatchedCell<T>
impl<T> !Sync for WatchedCell<T>
impl<T: ?Sized> Unpin for WatchedCell<T>where
T: Unpin,
impl<T> !UnwindSafe for WatchedCell<T>
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