pub enum Context<S> {
State(S),
Deferred(Box<Deferred<S>>),
}
Expand description
Deferred execution context holds its state or inner deferred execution (if there is deferred subroutine needed to evaluate).
Variants§
State(S)
Context holds single state.
Deferred(Box<Deferred<S>>)
Context holds deferred subroutine needed to evaluate.
Implementations§
Source§impl<S> Context<S>
impl<S> Context<S>
Sourcepub fn is_deferred(&self) -> bool
pub fn is_deferred(&self) -> bool
Tells if context holds a deferred subroutine to evaluate.
Sourcepub fn get_state(&self) -> Option<&S>
pub fn get_state(&self) -> Option<&S>
Gets reference to current state if there is one hold by context or its deferred subroutine.
Sourcepub fn get_deferred(&self) -> Option<&Deferred<S>>
pub fn get_deferred(&self) -> Option<&Deferred<S>>
Gets deferred subroutine if context has one.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Context<S>where
S: Freeze,
impl<S> RefUnwindSafe for Context<S>where
S: RefUnwindSafe,
impl<S> Send for Context<S>where
S: Send,
impl<S> Sync for Context<S>where
S: Sync,
impl<S> Unpin for Context<S>where
S: Unpin,
impl<S> UnwindSafe for Context<S>where
S: UnwindSafe,
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