pub struct DelegatedTask {Show 16 fields
pub delegation_id: DelegationId,
pub delegator_agent_id: AgentId,
pub delegatee: Option<AgentTarget>,
pub task_description: String,
pub parent_trajectory_id: TrajectoryId,
pub child_trajectory_id: Option<TrajectoryId>,
pub shared_artifacts: Vec<ArtifactId>,
pub shared_notes: Vec<NoteId>,
pub additional_context: Option<String>,
pub constraints: Option<Value>,
pub deadline: Option<Timestamp>,
pub status: DelegationStatus,
pub result: Option<DelegationResult>,
pub created_at: Timestamp,
pub accepted_at: Option<Timestamp>,
pub completed_at: Option<Timestamp>,
}Expand description
A delegated task from one agent to another.
Fields§
§delegation_id: DelegationId§delegator_agent_id: AgentId§delegatee: Option<AgentTarget>Delegatee: specific agent (by_id) or any agent of a type (by_type).
task_description: String§parent_trajectory_id: TrajectoryId§child_trajectory_id: Option<TrajectoryId>§additional_context: Option<String>§constraints: Option<Value>§deadline: Option<Timestamp>§status: DelegationStatus§result: Option<DelegationResult>§created_at: Timestamp§accepted_at: Option<Timestamp>§completed_at: Option<Timestamp>Implementations§
Source§impl DelegatedTask
impl DelegatedTask
Sourcepub fn to_agent(
from: AgentId,
to: AgentId,
trajectory: TrajectoryId,
description: &str,
) -> Self
pub fn to_agent( from: AgentId, to: AgentId, trajectory: TrajectoryId, description: &str, ) -> Self
Create a delegation to a specific agent.
Sourcepub fn to_type(
from: AgentId,
agent_type: impl Into<AgentType>,
trajectory: TrajectoryId,
description: &str,
) -> Self
pub fn to_type( from: AgentId, agent_type: impl Into<AgentType>, trajectory: TrajectoryId, description: &str, ) -> Self
Create a delegation to an agent type.
Add shared artifacts.
Add shared notes.
Sourcepub fn with_deadline(self, deadline: Timestamp) -> Self
pub fn with_deadline(self, deadline: Timestamp) -> Self
Set deadline.
Sourcepub fn complete(&mut self, result: DelegationResult)
pub fn complete(&mut self, result: DelegationResult)
Complete the delegation.
Trait Implementations§
Source§impl Clone for DelegatedTask
impl Clone for DelegatedTask
Source§fn clone(&self) -> DelegatedTask
fn clone(&self) -> DelegatedTask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for DelegatedTask
impl ComposeSchema for DelegatedTask
Source§impl Debug for DelegatedTask
impl Debug for DelegatedTask
Source§impl<'de> Deserialize<'de> for DelegatedTask
impl<'de> Deserialize<'de> for DelegatedTask
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
Source§impl PartialEq for DelegatedTask
impl PartialEq for DelegatedTask
Source§impl Serialize for DelegatedTask
impl Serialize for DelegatedTask
Source§impl ToSchema for DelegatedTask
impl ToSchema for DelegatedTask
impl StructuralPartialEq for DelegatedTask
Auto Trait Implementations§
impl Freeze for DelegatedTask
impl RefUnwindSafe for DelegatedTask
impl Send for DelegatedTask
impl Sync for DelegatedTask
impl Unpin for DelegatedTask
impl UnwindSafe for DelegatedTask
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