pub struct WorkflowHost { /* private fields */ }Expand description
A parsed, validated and compiled workflow. Assembly is the only constructor, so a long-running host cannot accidentally skip static validation.
Implementations§
Source§impl WorkflowHost
impl WorkflowHost
pub fn assemble( spec_json: &str, registry: &NodeRegistry, ) -> Result<Self, HostError>
pub fn from_spec( spec: &Spec, registry: &NodeRegistry, ) -> Result<Self, HostError>
pub fn spec_id(&self) -> &str
pub fn branch_id(&self) -> &str
pub fn branch_ids(&self) -> impl Iterator<Item = &str>
pub fn branch_count(&self) -> usize
pub fn context(&self, state: Arc<dyn State>) -> WorkflowContext
pub fn context_for( &self, branch_id: &str, state: Arc<dyn State>, ) -> WorkflowContext
pub async fn run_event( &self, ctx: &WorkflowContext, event: Event, ) -> Option<RunOutcome>
pub async fn run_event_on( &self, branch_id: &str, ctx: &WorkflowContext, event: Event, ) -> Option<RunOutcome>
Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowHost
impl !UnwindSafe for WorkflowHost
impl Freeze for WorkflowHost
impl Send for WorkflowHost
impl Sync for WorkflowHost
impl Unpin for WorkflowHost
impl UnsafeUnpin for WorkflowHost
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