pub struct Event {
pub id: EventId,
pub kind: EventKind,
pub payload: EventPayload,
pub timestamp: Timestamp,
pub source: Option<String>,
pub trace_id: Option<String>,
}Fields§
§id: EventId§kind: EventKind§payload: EventPayload§timestamp: Timestamp§source: Option<String>§trace_id: Option<String>Implementations§
Source§impl Event
impl Event
pub fn new(kind: EventKind) -> Self
pub fn with_payload(self, payload: EventPayload) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn agent_started(agent_id: AgentId) -> Self
pub fn agent_stopped(agent_id: AgentId) -> Self
pub fn tool_call_started( tool_call_id: ToolCallId, tool_name: impl Into<String>, ) -> Self
pub fn tool_call_completed( tool_call_id: ToolCallId, tool_name: impl Into<String>, ) -> Self
pub fn llm_completed( provider: impl Into<String>, model: impl Into<String>, usage: Option<TokenUsage>, ) -> Self
pub fn error(code: impl Into<String>, message: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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