pub struct HookStateStore { /* private fields */ }Implementations§
Source§impl HookStateStore
impl HookStateStore
pub fn new() -> Self
pub fn begin_render(&self)
pub fn end_render(&self, components: &ComponentTree)
pub fn abort_render(&self, _components: &ComponentTree)
pub fn value<T>(&self, id: HookId, initial: impl FnOnce() -> T) -> Twhere
T: Clone + 'static,
pub fn update_existing<T>(
&self,
id: HookId,
update: impl FnOnce(&mut T),
) -> boolwhere
T: 'static,
pub fn contains(&self, id: HookId) -> bool
pub fn clear(&self)
Trait Implementations§
Source§impl Default for HookStateStore
impl Default for HookStateStore
Source§fn default() -> HookStateStore
fn default() -> HookStateStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for HookStateStore
impl !RefUnwindSafe for HookStateStore
impl !Send for HookStateStore
impl !Sync for HookStateStore
impl !UnwindSafe for HookStateStore
impl Unpin for HookStateStore
impl UnsafeUnpin for HookStateStore
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