pub struct Task {
pub id: String,
pub subject: String,
pub description: String,
pub status: TaskStatus,
pub active_form: Option<String>,
pub owner: Option<String>,
pub blocked_by: Vec<String>,
pub blocks: Vec<String>,
pub metadata: Metadata,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Agent-managed task record used by task tools and display snapshots.
Fields§
§id: StringTask identifier.
subject: StringTask title in imperative form.
description: StringDetailed task description.
status: TaskStatusCurrent task status: pending, in_progress, or completed.
active_form: Option<String>Present-progress label shown while in progress.
owner: Option<String>Optional task owner.
blocked_by: Vec<String>Task ids this task is blocked by.
blocks: Vec<String>Task ids this task blocks.
metadata: MetadataAdditional task metadata.
created_at: DateTime<Utc>Task creation timestamp.
updated_at: DateTime<Utc>Last update timestamp.
Implementations§
Source§impl Task
impl Task
Sourcepub fn new(
id: impl Into<String>,
subject: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, subject: impl Into<String>, description: impl Into<String>, ) -> Self
Create a pending task.
Sourcepub const fn is_blocked(&self) -> bool
pub const fn is_blocked(&self) -> bool
Return whether task is blocked by any incomplete tasks.
Sourcepub const fn status_str(&self) -> &str
pub const fn status_str(&self) -> &str
Return status as a string.
Sourcepub fn set_status(&mut self, status: TaskStatus)
pub fn set_status(&mut self, status: TaskStatus)
Set status from a parsed status enum.
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Task
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more