pub struct Agent { /* private fields */ }
Implementations§
source§impl Agent
impl Agent
sourcepub fn add_stream(&self) -> Arc<Stream>
pub fn add_stream(&self) -> Arc<Stream>
Add a new Stream
to this agent
Examples
Add a Stream
let agent = Agent::default();
let s = agent.add_stream();
pub fn start(&self) -> Result<(), AgentError>
pub fn message_channel(&self) -> impl Stream<Item = AgentMessage>
sourcepub async fn close(&self) -> Result<(), AgentError>
pub async fn close(&self) -> Result<(), AgentError>
Close the agent loop