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) -> Flow
pub fn slow_clone(&self) -> Flow
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FlowRef
impl<'de> Deserialize<'de> for FlowRef
Source§fn deserialize<D>(
deserializer: D,
) -> Result<FlowRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<FlowRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for FlowRef
impl Serialize for FlowRef
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for FlowRef
Auto Trait Implementations§
impl Freeze for FlowRef
impl RefUnwindSafe for FlowRef
impl Send for FlowRef
impl Sync for FlowRef
impl Unpin for FlowRef
impl UnsafeUnpin for FlowRef
impl UnwindSafe for FlowRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request