pub trait WorkflowNode: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn node_type(&self) -> &str;
fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: NodeContext,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn input_schema(&self) -> Option<&Value> { ... }
fn output_schema(&self) -> Option<&Value> { ... }
}Expand description
Workflow node trait.
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
ctx: NodeContext,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: NodeContext,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the node.
Provided Methods§
Sourcefn input_schema(&self) -> Option<&Value>
fn input_schema(&self) -> Option<&Value>
Input schema (optional).
Sourcefn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
Output schema (optional).