Struct JoinTextAgent
pub struct JoinTextAgent { /* private fields */ }Expand description
Waits for dispatched background tasks and collects their results.
Implementations§
§impl JoinTextAgent
impl JoinTextAgent
pub fn new(name: impl Into<String>, registry: TaskRegistry) -> JoinTextAgent
pub fn new(name: impl Into<String>, registry: TaskRegistry) -> JoinTextAgent
Create a new join agent that waits for dispatched tasks.
pub fn targets(self, names: Vec<String>) -> JoinTextAgent
pub fn targets(self, names: Vec<String>) -> JoinTextAgent
Only wait for specific named tasks.
pub fn timeout(self, timeout: Duration) -> JoinTextAgent
pub fn timeout(self, timeout: Duration) -> JoinTextAgent
Set a timeout for waiting.
Trait Implementations§
§impl TextAgent for JoinTextAgent
impl TextAgent for JoinTextAgent
§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,
JoinTextAgent: '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,
JoinTextAgent: 'async_trait,
Execute this agent. Reads/writes
state. Returns the final text output.Auto Trait Implementations§
impl Freeze for JoinTextAgent
impl !RefUnwindSafe for JoinTextAgent
impl Send for JoinTextAgent
impl Sync for JoinTextAgent
impl Unpin for JoinTextAgent
impl !UnwindSafe for JoinTextAgent
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