pub struct StateWatcher<C: Component> { /* private fields */ }
Expand description
Keeps track of a components model and view.
Borrowing the model and view will notify the component to check for updates.
Implementations§
Source§impl<C: Component> StateWatcher<C>
impl<C: Component> StateWatcher<C>
Sourcepub fn get(&self) -> Ref<'_, ComponentParts<C>>
pub fn get(&self) -> Ref<'_, ComponentParts<C>>
Borrows the model and view of a component.
Sourcepub fn get_mut(&self) -> RefMut<'_, ComponentParts<C>>
pub fn get_mut(&self) -> RefMut<'_, ComponentParts<C>>
Borrows the model and view of a component, and notifies the component to check for updates.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for StateWatcher<C>
impl<C> !RefUnwindSafe for StateWatcher<C>
impl<C> !Send for StateWatcher<C>
impl<C> !Sync for StateWatcher<C>
impl<C> Unpin for StateWatcher<C>
impl<C> !UnwindSafe for StateWatcher<C>
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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