pub struct WorkflowRunner<'a> { /* private fields */ }Expand description
Builder-style runner for YAML workflow execution.
This is the preferred additive API for configuring workflow runs while keeping
legacy run_* helpers as compatibility adapters.
Implementations§
Source§impl<'a> WorkflowRunner<'a>
impl<'a> WorkflowRunner<'a>
pub fn from_file(workflow_path: &'a Path) -> Self
pub fn from_workflow(workflow: &'a YamlWorkflow) -> Self
pub fn with_input(self, workflow_input: &'a Value) -> Self
pub fn with_email_text(self, email_text: &'a str) -> Self
pub fn with_executor(self, executor: &'a dyn YamlWorkflowLlmExecutor) -> Self
pub fn with_client(self, client: &'a SimpleAgentsClient) -> Self
pub fn with_custom_worker( self, custom_worker: Option<&'a dyn YamlWorkflowCustomWorkerExecutor>, ) -> Self
pub fn with_event_sink( self, event_sink: Option<&'a dyn YamlWorkflowEventSink>, ) -> Self
pub fn with_typed_event_sink( self, typed_event_sink: Option<&'a dyn YamlWorkflowTypedEventSink>, ) -> Self
pub fn with_options(self, options: &'a YamlWorkflowRunOptions) -> Self
pub async fn run(self) -> Result<YamlWorkflowRunOutput, YamlWorkflowRunError>
Sourcepub async fn run_typed(
self,
) -> Result<YamlWorkflowRunTypedOutput, YamlWorkflowRunError>
pub async fn run_typed( self, ) -> Result<YamlWorkflowRunTypedOutput, YamlWorkflowRunError>
Execute the workflow and return the typed projection.
The typed output keeps only workflow identity, traversal, and node
outputs. Legacy fields on YamlWorkflowRunOutput such as telemetry,
timing, token counters, and email_text remain available via run().
Auto Trait Implementations§
impl<'a> Freeze for WorkflowRunner<'a>
impl<'a> !RefUnwindSafe for WorkflowRunner<'a>
impl<'a> Send for WorkflowRunner<'a>
impl<'a> Sync for WorkflowRunner<'a>
impl<'a> Unpin for WorkflowRunner<'a>
impl<'a> UnsafeUnpin for WorkflowRunner<'a>
impl<'a> !UnwindSafe for WorkflowRunner<'a>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Wrap the input message
T in a tonic::Request