#[non_exhaustive]pub struct WorkflowInvocation {
pub run_id: String,
pub spec: WorkflowSpec,
pub input: JsonValue,
pub history: Vec<FlowEventEnvelope>,
}Expand description
Workflow replay request passed to a runtime implementation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.run_id: StringDurable identifier of the workflow run being replayed.
spec: WorkflowSpecWorkflow definition recorded when the run was created.
input: JsonValueOriginal workflow input.
history: Vec<FlowEventEnvelope>Complete persisted event history in sequence order.
Implementations§
Source§impl WorkflowInvocation
impl WorkflowInvocation
Sourcepub fn new(
run_id: impl Into<String>,
spec: WorkflowSpec,
input: JsonValue,
history: Vec<FlowEventEnvelope>,
) -> Self
pub fn new( run_id: impl Into<String>, spec: WorkflowSpec, input: JsonValue, history: Vec<FlowEventEnvelope>, ) -> Self
Create a workflow invocation from its complete durable replay input.
Sourcepub fn context(&self) -> WorkflowContext<'_>
pub fn context(&self) -> WorkflowContext<'_>
Build a deterministic helper view over this workflow invocation.
Sourcepub fn input_as<T>(&self) -> Result<T>where
T: DeserializeOwned,
pub fn input_as<T>(&self) -> Result<T>where
T: DeserializeOwned,
Decode the workflow input into a host-defined serde type.
Trait Implementations§
Source§impl Clone for WorkflowInvocation
impl Clone for WorkflowInvocation
Source§fn clone(&self) -> WorkflowInvocation
fn clone(&self) -> WorkflowInvocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkflowInvocation
impl Debug for WorkflowInvocation
Source§impl<'de> Deserialize<'de> for WorkflowInvocation
impl<'de> Deserialize<'de> for WorkflowInvocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowInvocation
impl RefUnwindSafe for WorkflowInvocation
impl Send for WorkflowInvocation
impl Sync for WorkflowInvocation
impl Unpin for WorkflowInvocation
impl UnsafeUnpin for WorkflowInvocation
impl UnwindSafe for WorkflowInvocation
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