Struct RaceTextAgent
pub struct RaceTextAgent { /* private fields */ }Expand description
Runs agents concurrently, returns the first to complete. Cancels the rest.
Implementations§
§impl RaceTextAgent
impl RaceTextAgent
Trait Implementations§
§impl TextAgent for RaceTextAgent
impl TextAgent for RaceTextAgent
§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,
RaceTextAgent: '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,
RaceTextAgent: 'async_trait,
Execute this agent. Reads/writes
state. Returns the final text output.Auto Trait Implementations§
impl Freeze for RaceTextAgent
impl !RefUnwindSafe for RaceTextAgent
impl Send for RaceTextAgent
impl Sync for RaceTextAgent
impl Unpin for RaceTextAgent
impl !UnwindSafe for RaceTextAgent
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