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>::Pending
Notion will be applied before a future notion starts running. - A
Deferred::<T>::Complete
Notion will be applied after a future notion completes. - If any states are used during the run of a future notion,
a
Deferred::<T>::Outdated
Notion will be applied once after the value of any used states changes.
Variants§
Pending
A future notion is running.
Completed
Fields
A future notion has completed.
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> 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> 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.