pub enum StreamEvent<S: StateSchema> {
Start(S),
EnterNode(String, S),
NodeComplete(String, StateUpdate<S>),
StateUpdate(S),
End(S),
}Expand description
StreamEvent - Event for streaming execution
Variants§
Start(S)
Execution started with the initial state.
EnterNode(String, S)
A node was entered with the current state.
NodeComplete(String, StateUpdate<S>)
A node completed with its state update.
StateUpdate(S)
The state was updated after applying a reducer.
End(S)
Execution finished with the final state.
Implementations§
Source§impl<S: StateSchema> StreamEvent<S>
impl<S: StateSchema> StreamEvent<S>
Sourcepub fn enter_node(name: impl Into<String>, state: S) -> Self
pub fn enter_node(name: impl Into<String>, state: S) -> Self
Construct an EnterNode stream event.
Sourcepub fn node_complete(name: impl Into<String>, update: StateUpdate<S>) -> Self
pub fn node_complete(name: impl Into<String>, update: StateUpdate<S>) -> Self
Construct a NodeComplete stream event.
Sourcepub fn state_update(state: S) -> Self
pub fn state_update(state: S) -> Self
Construct a StateUpdate stream event.
Trait Implementations§
Source§impl<S: Clone + StateSchema> Clone for StreamEvent<S>
impl<S: Clone + StateSchema> Clone for StreamEvent<S>
Source§fn clone(&self) -> StreamEvent<S>
fn clone(&self) -> StreamEvent<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StreamEvent<S>
impl<S> RefUnwindSafe for StreamEvent<S>
impl<S> Send for StreamEvent<S>where
StateUpdate<S>: Send,
impl<S> Sync for StreamEvent<S>where
StateUpdate<S>: Sync,
impl<S> Unpin for StreamEvent<S>
impl<S> UnsafeUnpin for StreamEvent<S>
impl<S> UnwindSafe for StreamEvent<S>
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