pub struct WorkflowNode { /* private fields */ }Expand description
A graph node that runs a nested workflow.
Implementations§
Source§impl WorkflowNode
impl WorkflowNode
Sourcepub fn new(
name: &str,
edges: Vec<Edge>,
) -> Result<Arc<WorkflowNode>, WorkflowError>
pub fn new( name: &str, edges: Vec<Edge>, ) -> Result<Arc<WorkflowNode>, WorkflowError>
Builds the nested workflow named name from edges.
Trait Implementations§
Source§impl Node for WorkflowNode
impl Node for WorkflowNode
Source§fn run(&self, ctx: Context, input: Value) -> EventStream
fn run(&self, ctx: Context, input: Value) -> EventStream
Runs the nested workflow, forwarding its events with the output stripped, then yields the single terminal output as this node’s output.
Source§fn description(&self) -> &str
fn description(&self) -> &str
The node’s human-readable description.
Source§fn config(&self) -> &NodeConfig
fn config(&self) -> &NodeConfig
The node’s configuration.
Source§fn input_schema(&self) -> Option<&Value>
fn input_schema(&self) -> Option<&Value>
None = no schema, no input validation.Source§fn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
None = no schema, no output validation.Source§fn validate_input(&self, v: Value) -> Result<Value, WorkflowError>
fn validate_input(&self, v: Value) -> Result<Value, WorkflowError>
Called by the scheduler before
run on every activation.Source§fn validate_output(&self, v: Value) -> Result<Value, WorkflowError>
fn validate_output(&self, v: Value) -> Result<Value, WorkflowError>
Called by the scheduler on every yielded event with an output.
Source§fn state_field_names(&self) -> Option<&[String]>
fn state_field_names(&self) -> Option<&[String]>
The names of the state fields the node binds as parameters;
None = node does not bind
state params.Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowNode
impl !UnwindSafe for WorkflowNode
impl Forget for WorkflowNode
impl Freeze for WorkflowNode
impl Move for WorkflowNode
impl Send for WorkflowNode
impl Sync for WorkflowNode
impl Unpin for WorkflowNode
impl UnsafeUnpin for WorkflowNode
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