pub struct FlowRef(/* private fields */);Expand description
A wrapper around Arc<Flow> to support poem-openapi traits.
This wrapper exists to work around Rust’s orphan rules which prevent
implementing external traits on external types like Arc<Flow>.
Implementations§
Methods from Deref<Target = Flow>§
Sourcepub fn slow_clone(&self) -> Self
pub fn slow_clone(&self) -> Self
Create a clone of this flow.
Warning: This method performs a deep clone of the entire workflow structure, including all steps, metadata, and configurations. This can be expensive for large workflows.
§Performance
- Cloning large workflows with many steps can be slow
- Consider using
Arc<Flow>for shared ownership instead - Only use this when you need to modify the workflow structure
§Example
use stepflow_core::workflow::Flow;
let original_flow = Flow::default();
let cloned_flow = original_flow.slow_clone();pub fn name(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
pub fn metadata(&self) -> &HashMap<String, Value>
pub fn examples(&self) -> &[ExampleInput]
Sourcepub fn variables(&self) -> Option<VariableSchema>
pub fn variables(&self) -> Option<VariableSchema>
Get the variable schema for the flow.
This constructs a VariableSchema from the schema definition, extracting
runtime metadata like defaults, secrets, and required variables.
Sourcepub fn variable_schema(&self) -> Option<&SchemaRef>
pub fn variable_schema(&self) -> Option<&SchemaRef>
Get a reference to the variable schema (raw SchemaRef).
pub fn test(&self) -> Option<&TestConfig>
Sourcepub fn schemas(&self) -> &FlowSchema
pub fn schemas(&self) -> &FlowSchema
Get the flow’s schema information.
Sourcepub fn input_schema(&self) -> Option<&SchemaRef>
pub fn input_schema(&self) -> Option<&SchemaRef>
Get the flow’s input schema.
Sourcepub fn output_schema(&self) -> Option<&SchemaRef>
pub fn output_schema(&self) -> Option<&SchemaRef>
Get the flow’s output schema.
Sourcepub fn step_output_schema(&self, step_id: &str) -> Option<&SchemaRef>
pub fn step_output_schema(&self, step_id: &str) -> Option<&SchemaRef>
Get the output schema for a specific step.
Sourcepub fn get_all_examples(&self) -> Vec<ExampleInput>
pub fn get_all_examples(&self) -> Vec<ExampleInput>
Get all example inputs, including those derived from test cases.