pub struct WorkflowTask {
pub checkpoint_id: CheckpointId,
pub tenant_id: WorkflowTenantId,
pub workflow: String,
pub workflow_version: u32,
pub input: Value,
pub priority: i32,
}Expand description
One durable workflow task awaiting execution.
Fields§
§checkpoint_id: CheckpointIdCheckpoint identity shared across every retry and worker claim.
tenant_id: WorkflowTenantIdTenant that owns admission and control-plane authority for this task.
workflow: StringStable workflow definition name.
workflow_version: u32Caller-managed workflow definition version.
input: ValueCanonical workflow input.
priority: i32Higher values are claimed first.
Implementations§
Source§impl WorkflowTask
impl WorkflowTask
Sourcepub fn new(
workflow: impl Into<String>,
workflow_version: u32,
input: Value,
) -> Result<Self, WorkflowStoreError>
pub fn new( workflow: impl Into<String>, workflow_version: u32, input: Value, ) -> Result<Self, WorkflowStoreError>
Creates an immediately available workflow task.
§Errors
Rejects blank workflow names or version zero.
Sourcepub fn with_tenant(self, tenant_id: WorkflowTenantId) -> Self
pub fn with_tenant(self, tenant_id: WorkflowTenantId) -> Self
Assigns the task to an explicit tenant.
Sourcepub const fn with_checkpoint_id(self, checkpoint_id: CheckpointId) -> Self
pub const fn with_checkpoint_id(self, checkpoint_id: CheckpointId) -> Self
Uses an existing checkpoint identity.
Sourcepub const fn with_priority(self, priority: i32) -> Self
pub const fn with_priority(self, priority: i32) -> Self
Sets the task priority.
Trait Implementations§
Source§impl Clone for WorkflowTask
impl Clone for WorkflowTask
Source§fn clone(&self) -> WorkflowTask
fn clone(&self) -> WorkflowTask
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 WorkflowTask
impl Debug for WorkflowTask
Source§impl<'de> Deserialize<'de> for WorkflowTask
impl<'de> Deserialize<'de> for WorkflowTask
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
Source§impl PartialEq for WorkflowTask
impl PartialEq for WorkflowTask
Source§impl Serialize for WorkflowTask
impl Serialize for WorkflowTask
impl StructuralPartialEq for WorkflowTask
Auto Trait Implementations§
impl Freeze for WorkflowTask
impl RefUnwindSafe for WorkflowTask
impl Send for WorkflowTask
impl Sync for WorkflowTask
impl Unpin for WorkflowTask
impl UnsafeUnpin for WorkflowTask
impl UnwindSafe for WorkflowTask
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