pub struct Command<S: GraphState> { /* private fields */ }Expand description
Fluent builder for what a node returns: state delta + routing + optional payload.
Implementations§
Source§impl<S: GraphState> Command<S>
impl<S: GraphState> Command<S>
Sourcepub fn new(update: S::Update) -> Self
pub fn new(update: S::Update) -> Self
Build a Command with a state delta. Default routing is Goto::End.
Sourcepub fn goto_multiple<I, N>(self, names: I) -> Self
pub fn goto_multiple<I, N>(self, names: I) -> Self
Fan out to multiple named nodes.
Sourcepub fn with_payload(self, payload: Value) -> Self
pub fn with_payload(self, payload: Value) -> Self
Attach a payload. If the goto is a single-target Goto::Node, this
promotes it to Goto::Send so the receiving node can read the payload.
On Goto::End the payload is dropped.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Command<S>
impl<S> RefUnwindSafe for Command<S>
impl<S> Send for Command<S>
impl<S> Sync for Command<S>
impl<S> Unpin for Command<S>
impl<S> UnsafeUnpin for Command<S>
impl<S> UnwindSafe for Command<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