They are created with the
topo::CallId at which the state variable is bound.
updater with a reference to the state variable's latest value,
and enqueues a commit to the variable if
Revision at which the state variable was last rooted
if the variable is live, otherwise returns
This should be called during event handlers or other code which executes
outside of a
Revision's execution, otherwise unpredictable waker
behavior may be obtained.
impl<State> Key<State> where[src]
Commits a new state value if it is unequal to the current value and the state variable is still live. Has the same properties as update regarding waking the runtime.
Keys are considered equal if they point to the same state variable. Importantly, they will compare as equal even if they contain different snapshots of the state variable due to having been initialized in different revisions.
Auto Trait Implementations
impl<State> !RefUnwindSafe for Key<State>
impl<State> !UnwindSafe for Key<State>
impl<T> Downcast for T where
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.