pub struct SubagentDefinition {
pub id: String,
pub description: String,
pub system_prompt: String,
pub max_iterations: usize,
}Expand description
A subagent definition loaded from a file.
Fields§
§id: StringUnique identifier (e.g., “explore”, “plan”).
description: StringOne-sentence description for the tool listing.
system_prompt: StringSystem prompt for the subagent.
max_iterations: usizeMaximum iterations (default: 20).
Implementations§
Source§impl SubagentDefinition
impl SubagentDefinition
Sourcepub fn parse(content: &str) -> Result<Self, String>
pub fn parse(content: &str) -> Result<Self, String>
Parse a subagent definition from markdown content with YAML frontmatter.
Format:
---
name: subagent-id
description: Description of when to use this subagent.
---
System prompt content...§Errors
Returns an error when frontmatter is missing, invalid, or uses an unsupported version.
Trait Implementations§
Source§impl Clone for SubagentDefinition
impl Clone for SubagentDefinition
Source§fn clone(&self) -> SubagentDefinition
fn clone(&self) -> SubagentDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubagentDefinition
impl RefUnwindSafe for SubagentDefinition
impl Send for SubagentDefinition
impl Sync for SubagentDefinition
impl Unpin for SubagentDefinition
impl UnsafeUnpin for SubagentDefinition
impl UnwindSafe for SubagentDefinition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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