pub enum GraphResult<S> {
Complete(S),
Interrupted {
state: S,
interrupt_value: Value,
},
}Expand description
The result of a graph invocation.
Variants§
Complete(S)
Graph completed successfully.
Interrupted
Graph was interrupted and is waiting for input.
Implementations§
Source§impl<S> GraphResult<S>
impl<S> GraphResult<S>
Sourcepub fn state(&self) -> &S
pub fn state(&self) -> &S
Get the state, regardless of whether the graph completed or was interrupted.
Sourcepub fn into_state(self) -> S
pub fn into_state(self) -> S
Consume and return the state.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if the graph completed normally.
Sourcepub fn is_interrupted(&self) -> bool
pub fn is_interrupted(&self) -> bool
Returns true if the graph was interrupted.
Sourcepub fn interrupt_value(&self) -> Option<&Value>
pub fn interrupt_value(&self) -> Option<&Value>
Returns the interrupt value if the graph was interrupted.
Trait Implementations§
Source§impl<S: Clone> Clone for GraphResult<S>
impl<S: Clone> Clone for GraphResult<S>
Source§fn clone(&self) -> GraphResult<S>
fn clone(&self) -> GraphResult<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> Freeze for GraphResult<S>where
S: Freeze,
impl<S> RefUnwindSafe for GraphResult<S>where
S: RefUnwindSafe,
impl<S> Send for GraphResult<S>where
S: Send,
impl<S> Sync for GraphResult<S>where
S: Sync,
impl<S> Unpin for GraphResult<S>where
S: Unpin,
impl<S> UnsafeUnpin for GraphResult<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for GraphResult<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