pub struct Runtime { /* private fields */ }Expand description
Runtime for executing workflows
Implementations§
Source§impl Runtime
impl Runtime
pub fn new() -> Self
Sourcepub fn event_stream(&self) -> &EventStream
pub fn event_stream(&self) -> &EventStream
Get a reference to the event stream for subscribing to events
Sourcepub async fn execute(&self, workflow: Workflow) -> WorkflowRun
pub async fn execute(&self, workflow: Workflow) -> WorkflowRun
Execute a workflow and return the run with complete history
Sourcepub async fn execute_with_parent(
&self,
workflow: Workflow,
parent_workflow_id: Option<String>,
) -> WorkflowRun
pub async fn execute_with_parent( &self, workflow: Workflow, parent_workflow_id: Option<String>, ) -> WorkflowRun
Execute a workflow with optional parent workflow context
Sourcepub fn events_from_offset(&self, offset: u64) -> Vec<Event>
pub fn events_from_offset(&self, offset: u64) -> Vec<Event>
Get events from a specific offset (for replay)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
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