Struct FnTextAgent
pub struct FnTextAgent { /* private fields */ }Expand description
Zero-cost state transform agent — executes a closure, no LLM call.
Implementations§
§impl FnTextAgent
impl FnTextAgent
Trait Implementations§
§impl TextAgent for FnTextAgent
impl TextAgent for FnTextAgent
§fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 State,
) -> Pin<Box<dyn Future<Output = Result<String, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FnTextAgent: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 State,
) -> Pin<Box<dyn Future<Output = Result<String, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FnTextAgent: 'async_trait,
Execute this agent. Reads/writes
state. Returns the final text output.Auto Trait Implementations§
impl Freeze for FnTextAgent
impl !RefUnwindSafe for FnTextAgent
impl Send for FnTextAgent
impl Sync for FnTextAgent
impl Unpin for FnTextAgent
impl !UnwindSafe for FnTextAgent
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