pub struct AgentTask {
pub id: String,
pub description: String,
pub context: AgentContext,
pub workdir: Option<PathBuf>,
pub timeout_secs: u64,
}Expand description
One unit of work handed to a delegate.
Fields§
§id: String§description: String§context: AgentContext§workdir: Option<PathBuf>Working directory; the delegate should cd here before executing.
timeout_secs: u64Hard ceiling in seconds. The delegate kills the underlying process/request at or before this mark.
Implementations§
Source§impl AgentTask
impl AgentTask
pub fn new(description: impl Into<String>) -> Self
pub fn with_context(self, ctx: AgentContext) -> Self
pub fn with_workdir(self, workdir: impl Into<PathBuf>) -> Self
pub fn with_timeout_secs(self, secs: u64) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentTask
impl<'de> Deserialize<'de> for AgentTask
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 AgentTask
impl RefUnwindSafe for AgentTask
impl Send for AgentTask
impl Sync for AgentTask
impl Unpin for AgentTask
impl UnsafeUnpin for AgentTask
impl UnwindSafe for AgentTask
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