pub struct Workflow {
pub id: String,
pub name: String,
pub tasks: HashMap<String, Task>,
pub execution_order: Vec<String>,
pub status: WorkflowStatus,
pub created_at: Instant,
}
Expand description
Workflow definition containing multiple tasks
Fields§
§id: String
§name: String
§tasks: HashMap<String, Task>
§execution_order: Vec<String>
§status: WorkflowStatus
§created_at: Instant
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn workflow_id(id: String, name: String) -> Self
pub fn workflow_id(id: String, name: String) -> Self
Create a new workflow
Sourcepub fn get_ready_tasks(&self) -> Vec<&Task>
pub fn get_ready_tasks(&self) -> Vec<&Task>
Get tasks that are ready to execute (dependencies satisfied)
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if workflow is complete
Sourcepub fn has_failed(&self) -> bool
pub fn has_failed(&self) -> bool
Check if workflow has failed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe for Workflow
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more