#[non_exhaustive]pub struct WorkflowSpec {
pub name: String,
pub version: String,
pub runtime: RuntimeSpec,
pub runtime_build_id: Option<RuntimeBuildId>,
pub patch_markers: BTreeSet<WorkflowPatchId>,
pub signal_names: BTreeSet<String>,
}Expand description
Durable workflow definition.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringStable workflow type name used for registration and inspection.
version: StringApplication-defined workflow definition version.
runtime: RuntimeSpecRuntime entrypoint used to replay the workflow.
runtime_build_id: Option<RuntimeBuildId>Exact deployed runtime build required to replay this run.
patch_markers: BTreeSet<WorkflowPatchId>Replay-safe code changes enabled for this run at creation time.
signal_names: BTreeSet<String>Named asynchronous message contracts accepted by this workflow.
Implementations§
Source§impl WorkflowSpec
impl WorkflowSpec
Sourcepub fn native_ts(
name: impl Into<String>,
version: impl Into<String>,
entrypoint: impl Into<String>,
export_name: impl Into<String>,
) -> Self
pub fn native_ts( name: impl Into<String>, version: impl Into<String>, entrypoint: impl Into<String>, export_name: impl Into<String>, ) -> Self
Creates a workflow definition backed by native TypeScript.
Sourcepub fn rust_embedded(
name: impl Into<String>,
version: impl Into<String>,
entrypoint: impl Into<String>,
export_name: impl Into<String>,
) -> Self
pub fn rust_embedded( name: impl Into<String>, version: impl Into<String>, entrypoint: impl Into<String>, export_name: impl Into<String>, ) -> Self
Creates a workflow definition backed by an embedded Rust runtime.
Sourcepub fn with_runtime_build(self, runtime_build_id: RuntimeBuildId) -> Self
pub fn with_runtime_build(self, runtime_build_id: RuntimeBuildId) -> Self
Pin new runs to the exact runtime build that can replay them.
Sourcepub fn with_patch_marker(self, patch_id: WorkflowPatchId) -> Self
pub fn with_patch_marker(self, patch_id: WorkflowPatchId) -> Self
Enable a replay-safe code path for every run created from this spec.
The complete marker set is persisted atomically inside run_created.
Reusing an existing run ID with a different set is rejected as a start
conflict instead of changing the behavior of an in-flight history.
Sourcepub fn has_patch_marker(&self, patch_id: &str) -> bool
pub fn has_patch_marker(&self, patch_id: &str) -> bool
Return whether this immutable run definition contains patch_id.
Sourcepub fn with_signal(self, signal_name: impl Into<String>) -> Self
pub fn with_signal(self, signal_name: impl Into<String>) -> Self
Declare one named asynchronous signal contract for this workflow.
Sourcepub fn accepts_signal(&self, signal_name: &str) -> bool
pub fn accepts_signal(&self, signal_name: &str) -> bool
Return whether this immutable workflow definition accepts signal_name.
Trait Implementations§
Source§impl Clone for WorkflowSpec
impl Clone for WorkflowSpec
Source§fn clone(&self) -> WorkflowSpec
fn clone(&self) -> WorkflowSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkflowSpec
impl Debug for WorkflowSpec
Source§impl<'de> Deserialize<'de> for WorkflowSpec
impl<'de> Deserialize<'de> for WorkflowSpec
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>,
impl Eq for WorkflowSpec
Source§impl From<&WorkflowSpec> for FlowWorkflowIdentity
impl From<&WorkflowSpec> for FlowWorkflowIdentity
Source§fn from(spec: &WorkflowSpec) -> Self
fn from(spec: &WorkflowSpec) -> Self
Source§impl PartialEq for WorkflowSpec
impl PartialEq for WorkflowSpec
Source§impl Serialize for WorkflowSpec
impl Serialize for WorkflowSpec
impl StructuralPartialEq for WorkflowSpec
Auto Trait Implementations§
impl Freeze for WorkflowSpec
impl RefUnwindSafe for WorkflowSpec
impl Send for WorkflowSpec
impl Sync for WorkflowSpec
impl Unpin for WorkflowSpec
impl UnsafeUnpin for WorkflowSpec
impl UnwindSafe for WorkflowSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.