pub struct SubTask {Show 13 fields
pub id: String,
pub name: String,
pub instruction: String,
pub specialty: Option<String>,
pub dependencies: Vec<String>,
pub priority: i32,
pub max_steps: usize,
pub context: SubTaskContext,
pub status: SubTaskStatus,
pub assigned_agent: Option<String>,
pub created_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub stage: usize,
}Expand description
A sub-task that can be executed by a sub-agent
Fields§
§id: StringUnique identifier
name: StringHuman-readable name/description
instruction: StringThe task instruction for the sub-agent
specialty: Option<String>Specialty/domain for this subtask
dependencies: Vec<String>Dependencies on other subtasks (by ID)
priority: i32Priority (higher = more important)
max_steps: usizeMaximum steps allowed for this subtask
context: SubTaskContextInput context from parent or dependencies
status: SubTaskStatusCurrent status
assigned_agent: Option<String>Assigned sub-agent ID
created_at: DateTime<Utc>Creation timestamp
completed_at: Option<DateTime<Utc>>Completion timestamp
stage: usizeStage in the execution plan (0 = can run immediately)
Implementations§
Source§impl SubTask
impl SubTask
Sourcepub fn new(name: impl Into<String>, instruction: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, instruction: impl Into<String>) -> Self
Create a new subtask
Sourcepub fn with_specialty(self, specialty: impl Into<String>) -> Self
pub fn with_specialty(self, specialty: impl Into<String>) -> Self
Add a specialty
Sourcepub fn with_dependencies(self, deps: Vec<String>) -> Self
pub fn with_dependencies(self, deps: Vec<String>) -> Self
Add dependencies
Sourcepub fn with_priority(self, priority: i32) -> Self
pub fn with_priority(self, priority: i32) -> Self
Set priority
Sourcepub fn with_max_steps(self, max_steps: usize) -> Self
pub fn with_max_steps(self, max_steps: usize) -> Self
Set max steps
Sourcepub fn with_context(self, context: SubTaskContext) -> Self
pub fn with_context(self, context: SubTaskContext) -> Self
Add context
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SubTask
impl<'de> Deserialize<'de> for SubTask
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 SubTask
impl RefUnwindSafe for SubTask
impl Send for SubTask
impl Sync for SubTask
impl Unpin for SubTask
impl UnwindSafe for SubTask
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