pub struct StateStore { /* private fields */ }Expand description
What every component’s state, and every hook’s, is kept in between rebuilds. It lives in
the Runtime, under the place of the component that owns it.
Implementations§
Source§impl StateStore
impl StateStore
Sourcepub fn begin_build(&self)
pub fn begin_build(&self)
A rebuild of the tree is about to run. Every state it reaches is marked as reached.
Sourcepub fn end_frame(&self)
pub fn end_frame(&self)
The frame is done laying out: the states a rebuild did not reach are disposed, and the effects it asked for run.
Effects run after the tree is built and laid out, so that what they do — start a timer, read a controller, ask for another rebuild — never happens in the middle of building.
Sourcepub fn provide<T: 'static>(&self, value: Rc<T>)
pub fn provide<T: 'static>(&self, value: Rc<T>)
Makes value available to every component below as a service: the way an
application-wide object — a router, a repository — is reached from a build.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StateStore
impl !RefUnwindSafe for StateStore
impl !Send for StateStore
impl !Sync for StateStore
impl !UnwindSafe for StateStore
impl Unpin for StateStore
impl UnsafeUnpin for StateStore
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