Struct relm4::component::StateWatcher
source · 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.