pub enum AgentEvent {
Tokens {
content: String,
source_id: u32,
is_final: bool,
},
ResponseStart {
source_id: u32,
},
ResponseEnd {
source_id: u32,
},
Error {
message: String,
source_id: u32,
},
ConnectionStatus {
connected: bool,
source_id: u32,
},
}Expand description
Events from agent/network threads.
These represent async data arriving from external sources.
Variants§
Tokens
Token(s) received from agent stream.
Fields
ResponseStart
Agent started a new response.
ResponseEnd
Agent finished responding.
Error
Agent encountered an error.
ConnectionStatus
Connection status changed.
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnwindSafe for AgentEvent
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