pub struct SubAgentHandle {
pub id: SubAgentId,
pub parent_id: Option<SubAgentId>,
pub task: String,
pub depth: usize,
pub started_at: DateTime<Utc>,
/* private fields */
}Expand description
Handle to a running subagent.
Fields§
§id: SubAgentIdSubagent ID.
parent_id: Option<SubAgentId>Parent agent ID (if nested).
task: StringTask description.
depth: usizeCurrent depth (0 for first-level subagents).
started_at: DateTime<Utc>When the subagent started.
Implementations§
Source§impl SubAgentHandle
impl SubAgentHandle
Sourcepub fn new(
task: impl Into<String>,
parent_id: Option<SubAgentId>,
depth: usize,
permit: Option<OwnedSemaphorePermit>,
) -> Self
pub fn new( task: impl Into<String>, parent_id: Option<SubAgentId>, depth: usize, permit: Option<OwnedSemaphorePermit>, ) -> Self
Create a new subagent handle.
Sourcepub async fn status(&self) -> SubAgentStatus
pub async fn status(&self) -> SubAgentStatus
Get current status.
Sourcepub fn final_status(&self) -> Option<SubAgentStatus>
pub fn final_status(&self) -> Option<SubAgentStatus>
Get final status synchronously (only set when terminal).
§Panics
Panics if the internal mutex is poisoned.
Sourcepub async fn set_status(&self, status: SubAgentStatus)
pub async fn set_status(&self, status: SubAgentStatus)
Sourcepub async fn mark_running(&self)
pub async fn mark_running(&self)
Mark as running.
Sourcepub async fn completed_at(&self) -> Option<DateTime<Utc>>
pub async fn completed_at(&self) -> Option<DateTime<Utc>>
Get completion time (if done).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SubAgentHandle
impl !RefUnwindSafe for SubAgentHandle
impl Send for SubAgentHandle
impl Sync for SubAgentHandle
impl Unpin for SubAgentHandle
impl UnsafeUnpin for SubAgentHandle
impl !UnwindSafe for SubAgentHandle
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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