pub struct Task {Show 19 fields
pub id: String,
pub goal_id: String,
pub description: String,
pub status: String,
pub priority: String,
pub task_order: i32,
pub parallel_group: Option<String>,
pub depends_on: Option<String>,
pub agent_id: Option<String>,
pub context: Option<String>,
pub result: Option<String>,
pub error: Option<String>,
pub blocker: Option<String>,
pub idempotent: bool,
pub retry_count: i32,
pub max_retries: i32,
pub created_at: String,
pub started_at: Option<String>,
pub completed_at: Option<String>,
}Expand description
A task — a discrete unit of work within a goal.
Fields§
§id: String§goal_id: String§description: String§status: String“pending”, “claimed”, “running”, “completed”, “failed”, “blocked”, “skipped”, or “superseded”
priority: String“low”, “medium”, “high”
task_order: i32Execution order within the goal
parallel_group: Option<String>Tasks in the same parallel group can run concurrently
depends_on: Option<String>JSON array of task IDs this task depends on
agent_id: Option<String>Agent/executor ID that claimed this task
context: Option<String>JSON context blob
result: Option<String>Result text on completion
error: Option<String>Error message on failure
blocker: Option<String>Blocker description if status is “blocked”
idempotent: boolWhether this task is safe to retry
retry_count: i32§max_retries: i32§created_at: String§started_at: Option<String>§completed_at: Option<String>Implementations§
Source§impl Task
impl Task
Sourcepub fn dependency_ids(&self) -> Result<Vec<String>, String>
pub fn dependency_ids(&self) -> Result<Vec<String>, String>
Parse the compatibility JSON projection into typed dependency IDs. Durable scheduling also stores normalized edges; this method is the shared validation boundary for callers and migration compatibility.
Sourcepub fn has_error(&self) -> bool
pub fn has_error(&self) -> bool
SQLite contains legacy task rows whose optional error field is an empty string instead of NULL. Treat blank error text as absent everywhere task success is evaluated.
Sourcepub fn has_blocker(&self) -> bool
pub fn has_blocker(&self) -> bool
A blocker is unresolved work even if a stale coordinator has written a terminal-looking status. Treat legacy empty strings as absent, matching the normalization used for errors.
pub fn completed_successfully(&self) -> bool
Sourcepub fn satisfies_run_completion(&self) -> bool
pub fn satisfies_run_completion(&self) -> bool
True when this task no longer represents required work for the current run. A superseded task is not itself a success, but a successful replacement means it must not poison the run’s terminal outcome.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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>,
Auto Trait Implementations§
impl Forget for Task
impl Freeze for Task
impl Move for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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