Struct drying_paint::WatchedCellCore
source · [−]pub struct WatchedCellCore<'ctx, T: ?Sized, O: ?Sized = DefaultOwner> { /* 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
sourceimpl<'ctx, T: ?Sized, O: ?Sized> WatchedCellCore<'ctx, T, O>
impl<'ctx, T: ?Sized, O: ?Sized> WatchedCellCore<'ctx, T, O>
sourceimpl<T: ?Sized> WatchedCellCore<'static, T, DefaultOwner>
impl<T: ?Sized> WatchedCellCore<'static, T, DefaultOwner>
pub fn get_mut_auto(&mut self) -> &mut T
pub fn watched_auto(&self)
sourceimpl<'ctx, T, O: ?Sized> WatchedCellCore<'ctx, T, O>
impl<'ctx, T, O: ?Sized> WatchedCellCore<'ctx, T, O>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwraps the WatchedCell, returning the contained value
sourceimpl<T> WatchedCellCore<'static, T, DefaultOwner>
impl<T> WatchedCellCore<'static, T, DefaultOwner>
pub fn set_auto(&self, value: T)
pub fn replace_auto(&self, value: T) -> T
sourceimpl<'ctx, T: Copy, O: ?Sized> WatchedCellCore<'ctx, T, O>
impl<'ctx, T: Copy, O: ?Sized> WatchedCellCore<'ctx, T, O>
pub fn get_unwatched(&self) -> T
sourceimpl<T: Copy> WatchedCellCore<'static, T, DefaultOwner>
impl<T: Copy> WatchedCellCore<'static, T, DefaultOwner>
sourceimpl<'ctx, T: Default, O: ?Sized> WatchedCellCore<'ctx, T, O>
impl<'ctx, T: Default, O: ?Sized> WatchedCellCore<'ctx, T, O>
sourceimpl<T: Default> WatchedCellCore<'static, T, DefaultOwner>
impl<T: Default> WatchedCellCore<'static, T, DefaultOwner>
Trait Implementations
sourceimpl<'ctx, T: Default, O: ?Sized> Default for WatchedCellCore<'ctx, T, O>
impl<'ctx, T: Default, O: ?Sized> Default for WatchedCellCore<'ctx, T, O>
Auto Trait Implementations
impl<'ctx, T, O = DefaultOwner> !RefUnwindSafe for WatchedCellCore<'ctx, T, O>
impl<'ctx, T, O = DefaultOwner> !Send for WatchedCellCore<'ctx, T, O>
impl<'ctx, T, O = DefaultOwner> !Sync for WatchedCellCore<'ctx, T, O>
impl<'ctx, T: ?Sized, O: ?Sized> Unpin for WatchedCellCore<'ctx, T, O> where
T: Unpin,
impl<'ctx, T, O = DefaultOwner> !UnwindSafe for WatchedCellCore<'ctx, T, O>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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