pub struct WorkflowTask {
pub id: Uuid,
pub task_name: String,
pub args: Vec<Value>,
pub kwargs: HashMap<String, Value>,
pub dependencies: Vec<Uuid>,
}Expand description
A task in a workflow
Fields§
§id: UuidUnique task identifier
task_name: StringTask name
args: Vec<Value>Task arguments (JSON)
kwargs: HashMap<String, Value>Task keyword arguments (JSON)
dependencies: Vec<Uuid>Dependencies (task IDs that must complete first)
Implementations§
Source§impl WorkflowTask
impl WorkflowTask
Sourcepub fn with_kwargs(self, kwargs: HashMap<String, Value>) -> Self
pub fn with_kwargs(self, kwargs: HashMap<String, Value>) -> Self
Set task keyword arguments
Sourcepub fn depends_on(self, task_id: Uuid) -> Self
pub fn depends_on(self, task_id: Uuid) -> Self
Add a dependency on another task
Sourcepub fn depends_on_many(self, task_ids: Vec<Uuid>) -> Self
pub fn depends_on_many(self, task_ids: Vec<Uuid>) -> Self
Add multiple dependencies
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 · 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
Auto Trait Implementations§
impl Freeze for WorkflowTask
impl RefUnwindSafe for WorkflowTask
impl Send for WorkflowTask
impl Sync for WorkflowTask
impl Unpin 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