pub struct WorkflowIdentity {
pub workflow_id: InvocationId,
pub workflow_type: TaskId,
pub parent_id: Option<InvocationId>,
pub depth: u32,
}Expand description
Tracks parent-child relationships in distributed workflows.
Matches pynenc’s WorkflowIdentity. Every workflow is rooted by a
defining invocation; the workflow_type captures which task started it.
Fields§
§workflow_id: InvocationIdThe root workflow invocation ID
workflow_type: TaskIdThe task that defines this workflow (the root task)
parent_id: Option<InvocationId>The parent workflow ID if this is a sub-workflow (None for top-level)
depth: u32Depth in the workflow tree (0 for root)
Implementations§
Source§impl WorkflowIdentity
impl WorkflowIdentity
Sourcepub fn root(
workflow_id: InvocationId,
workflow_type: TaskId,
) -> WorkflowIdentity
pub fn root( workflow_id: InvocationId, workflow_type: TaskId, ) -> WorkflowIdentity
Create a new root workflow identity.
Sourcepub fn child(
workflow_id: InvocationId,
workflow_type: TaskId,
parent_id: InvocationId,
depth: u32,
) -> WorkflowIdentity
pub fn child( workflow_id: InvocationId, workflow_type: TaskId, parent_id: InvocationId, depth: u32, ) -> WorkflowIdentity
Create a child identity within the same workflow.
Sourcepub fn sub_workflow(
workflow_id: InvocationId,
workflow_type: TaskId,
parent_workflow_id: InvocationId,
) -> WorkflowIdentity
pub fn sub_workflow( workflow_id: InvocationId, workflow_type: TaskId, parent_workflow_id: InvocationId, ) -> WorkflowIdentity
Create a new sub-workflow identity (force_new_workflow).
Sourcepub fn is_sub_workflow(&self) -> bool
pub fn is_sub_workflow(&self) -> bool
Returns true if this workflow is nested under another.
Trait Implementations§
Source§impl Clone for WorkflowIdentity
impl Clone for WorkflowIdentity
Source§fn clone(&self) -> WorkflowIdentity
fn clone(&self) -> WorkflowIdentity
Returns a duplicate of the value. Read more
1.0.0 · 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 WorkflowIdentity
impl Debug for WorkflowIdentity
Source§impl<'de> Deserialize<'de> for WorkflowIdentity
impl<'de> Deserialize<'de> for WorkflowIdentity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkflowIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkflowIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for WorkflowIdentity
impl Serialize for WorkflowIdentity
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowIdentity
impl RefUnwindSafe for WorkflowIdentity
impl Send for WorkflowIdentity
impl Sync for WorkflowIdentity
impl Unpin for WorkflowIdentity
impl UnsafeUnpin for WorkflowIdentity
impl UnwindSafe for WorkflowIdentity
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