Skip to main content

Workflow

Struct Workflow 

Source
pub struct Workflow<C, Input, M = ()> { /* private fields */ }
Expand description

A built workflow that can be executed.

Implementations§

Source§

impl<C, Input, M> Workflow<C, Input, M>

Source

pub fn workflow_id(&self) -> &str

Get the workflow ID.

Source

pub fn definition_hash(&self) -> &str

Get the definition hash.

This hash is computed from the workflow’s continuation structure and serves as a version identifier. It can be used to detect when a serialized workflow state was created with a different workflow definition.

Source

pub fn context(&self) -> &WorkflowContext<C, M>

Get a reference to the context of this workflow.

Source

pub fn codec(&self) -> &Arc<C>

Get a reference to the codec used by this workflow.

Source

pub fn continuation(&self) -> &WorkflowContinuation

Get a reference to the continuation of this workflow.

Source

pub fn metadata(&self) -> &Arc<M>

Get a reference to the metadata attached to this workflow.

Auto Trait Implementations§

§

impl<C, Input, M> Freeze for Workflow<C, Input, M>

§

impl<C, Input, M = ()> !RefUnwindSafe for Workflow<C, Input, M>

§

impl<C, Input, M> Send for Workflow<C, Input, M>
where Input: Send, C: Sync + Send, M: Sync + Send,

§

impl<C, Input, M> Sync for Workflow<C, Input, M>
where Input: Sync, C: Sync + Send, M: Sync + Send,

§

impl<C, Input, M> Unpin for Workflow<C, Input, M>
where Input: Unpin,

§

impl<C, Input, M> UnsafeUnpin for Workflow<C, Input, M>

§

impl<C, Input, M = ()> !UnwindSafe for Workflow<C, Input, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.