pub struct WorkflowExecutor { /* private fields */ }Implementations§
Source§impl WorkflowExecutor
impl WorkflowExecutor
Sourcepub fn new(id: impl Into<String>, workflow: Workflow) -> WorkflowExecutor
pub fn new(id: impl Into<String>, workflow: Workflow) -> WorkflowExecutor
Wrap workflow as an executor with the given id.
By default the child’s outputs are sent onward as messages from this
node. Use WorkflowExecutor::with_direct_output to instead yield them
directly as parent workflow outputs.
Sourcepub fn with_direct_output(self, allow: bool) -> WorkflowExecutor
pub fn with_direct_output(self, allow: bool) -> WorkflowExecutor
Yield the child’s outputs directly to the parent’s output stream instead of forwarding them as messages.
Trait Implementations§
Source§impl Executor for WorkflowExecutor
impl Executor for WorkflowExecutor
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
message: Value,
ctx: WorkflowContext,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
WorkflowExecutor: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
message: Value,
ctx: WorkflowContext,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
WorkflowExecutor: 'async_trait,
Handle an incoming message.
Auto Trait Implementations§
impl !Freeze for WorkflowExecutor
impl !RefUnwindSafe for WorkflowExecutor
impl !UnwindSafe for WorkflowExecutor
impl Send for WorkflowExecutor
impl Sync for WorkflowExecutor
impl Unpin for WorkflowExecutor
impl UnsafeUnpin for WorkflowExecutor
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