pub struct TaskNode { /* private fields */ }Expand description
A single task node in the dependency graph
Implementations§
Source§impl TaskNode
impl TaskNode
pub fn new( id: String, name: String, task_type: TaskType, priority: TaskPriority, description: String, ) -> Self
pub fn with_dependency(self, dependency_id: &str) -> Self
pub fn with_config(self, config: TaskConfig) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
pub fn with_duration(self, duration_ms: u64) -> Self
pub fn with_components(self, components: Vec<String>) -> Self
pub fn with_thinktools(self, thinktools: Vec<String>) -> Self
pub fn requires_m2(self, requires: bool) -> Self
pub fn with_max_retries(self, retries: u32) -> Self
pub fn id(&self) -> &str
pub fn name(&self) -> &str
pub fn task_type(&self) -> TaskType
pub fn priority(&self) -> TaskPriority
pub fn status(&self) -> TaskStatus
pub fn dependencies(&self) -> &HashSet<String>
pub fn description(&self) -> &str
pub fn config(&self) -> &TaskConfig
pub fn metadata(&self) -> &Value
pub fn estimated_duration_ms(&self) -> u64
pub fn required_components(&self) -> &[String]
pub fn required_thinktools(&self) -> &[String]
pub fn requires_m2_capability(&self) -> bool
pub fn created_at(&self) -> u64
pub fn started_at(&self) -> Option<u64>
pub fn completed_at(&self) -> Option<u64>
pub fn retry_count(&self) -> u32
pub fn max_retries(&self) -> u32
pub fn requires_thinktool(&self) -> bool
pub fn mark_running(&mut self)
pub fn mark_completed(&mut self)
pub fn mark_failed(&mut self)
pub fn increment_retry(&mut self)
pub fn can_retry(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskNode
impl RefUnwindSafe for TaskNode
impl Send for TaskNode
impl Sync for TaskNode
impl Unpin for TaskNode
impl UnwindSafe for TaskNode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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