pub enum Deferred<T>where
T: FutureNotion,{
Pending {
input: Rc<T::Input>,
},
Completed {
input: Rc<T::Input>,
output: Rc<T::Output>,
},
Outdated {
input: Rc<T::Input>,
},
}Expand description
A deferred result type for future notions.
For each future notion T, a Deferred<T> the following notions will be applied to states:
- A
Deferred::<T>::PendingNotion will be applied before a future notion starts running. - A
Deferred::<T>::CompleteNotion will be applied after a future notion completes. - If any states are used during the run of a future notion,
a
Deferred::<T>::OutdatedNotion will be applied once after the value of any used states changes.
Variants§
Pending
A future notion is running.
Completed
A future notion has completed.
Fields
Outdated
The states used in the future notion run has been changed.
Implementations§
Source§impl<T> Deferred<T>where
T: FutureNotion,
impl<T> Deferred<T>where
T: FutureNotion,
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Returns true if current future notion is still running.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns true if current future notion has been completed.
Sourcepub fn is_outdated(&self) -> bool
pub fn is_outdated(&self) -> bool
Returns true if current future notion is outdated.
Trait Implementations§
Source§impl<T> Clone for Deferred<T>where
T: FutureNotion,
impl<T> Clone for Deferred<T>where
T: FutureNotion,
Auto Trait Implementations§
impl<T> Freeze for Deferred<T>
impl<T> RefUnwindSafe for Deferred<T>
impl<T> !Send for Deferred<T>
impl<T> !Sync for Deferred<T>
impl<T> Unpin for Deferred<T>
impl<T> UnwindSafe for Deferred<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.