pub struct WorkflowRunner { /* private fields */ }Expand description
Workflow execution runner
Implementations§
Source§impl WorkflowRunner
impl WorkflowRunner
Sourcepub fn with_context(workflow: Workflow, context: WorkflowContext) -> Self
pub fn with_context(workflow: Workflow, context: WorkflowContext) -> Self
Create with initial context
Sourcepub async fn step(&mut self) -> Result<NextAction, CrewError>
pub async fn step(&mut self) -> Result<NextAction, CrewError>
Execute one step of the workflow
Sourcepub async fn provide_input(&mut self, input: Value)
pub async fn provide_input(&mut self, input: Value)
Provide input for a pending request
Sourcepub async fn run(&mut self) -> Result<WorkflowResult, CrewError>
pub async fn run(&mut self) -> Result<WorkflowResult, CrewError>
Run workflow to completion
Sourcepub async fn context(&self) -> WorkflowContext
pub async fn context(&self) -> WorkflowContext
Get current context
Auto Trait Implementations§
impl Freeze for WorkflowRunner
impl !RefUnwindSafe for WorkflowRunner
impl Send for WorkflowRunner
impl Sync for WorkflowRunner
impl Unpin for WorkflowRunner
impl UnsafeUnpin for WorkflowRunner
impl !UnwindSafe for WorkflowRunner
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more