Skip to main content

WorkItem

Trait WorkItem 

Source
pub trait WorkItem:
    Debug
    + Display
    + Send
    + Sync
    + Serialize
    + DeserializeOwned
    + Clone
    + PartialEq {
    // Required methods
    fn instance_id(&self) -> String;
    fn is_terminal(&self) -> bool;
}
Expand description

Trait for a workflow work item.

Implementations provide a way to serialize and deserialize work items, and track unique instances within a workflow run.

Required Methods§

Source

fn instance_id(&self) -> String

Returns a unique identifier for this work item instance.

Source

fn is_terminal(&self) -> bool

Returns true if this work item is a terminal node (no successors)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§