pub struct WorkflowContext<C, M> {
pub workflow_id: Arc<str>,
pub codec: Arc<C>,
pub metadata: Arc<M>,
}Expand description
Workflow execution context that provides access to metadata and codec.
This context is always available as a plain struct. When the tokio feature
is enabled, it can also be stored in task-local storage and retrieved via
the [sayiir_ctx!] macro.
Fields§
§workflow_id: Arc<str>The unique workflow identifier.
codec: Arc<C>The codec used for serialization/deserialization.
metadata: Arc<M>Immutable metadata attached to the workflow.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<C, M> Freeze for WorkflowContext<C, M>
impl<C, M> RefUnwindSafe for WorkflowContext<C, M>where
C: RefUnwindSafe,
M: RefUnwindSafe,
impl<C, M> Send for WorkflowContext<C, M>
impl<C, M> Sync for WorkflowContext<C, M>
impl<C, M> Unpin for WorkflowContext<C, M>
impl<C, M> UnsafeUnpin for WorkflowContext<C, M>
impl<C, M> UnwindSafe for WorkflowContext<C, M>where
C: RefUnwindSafe,
M: RefUnwindSafe,
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