pub struct RunEvent {
pub version: RunEventVersion,
pub event_id: EventId,
pub run_id: String,
pub trace_id: String,
pub session_id: Option<String>,
pub parent_event_id: Option<String>,
pub parent_run_id: Option<String>,
pub created_at_ms: u128,
pub cycle_index: Option<u32>,
pub agent_name: Option<String>,
pub metadata: Metadata,
pub payload: RunEventPayload,
}Fields§
§version: RunEventVersion§event_id: EventId§run_id: String§trace_id: String§session_id: Option<String>§parent_event_id: Option<String>§parent_run_id: Option<String>§created_at_ms: u128§cycle_index: Option<u32>§agent_name: Option<String>§metadata: Metadata§payload: RunEventPayloadImplementations§
Source§impl RunEvent
impl RunEvent
pub fn new( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: Option<u32>, payload: RunEventPayload, ) -> Self
pub fn run_started( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, input: impl Into<String>, ) -> Self
pub fn cycle_started( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: u32, ) -> Self
pub fn assistant_delta( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: u32, delta: impl Into<String>, ) -> Self
pub fn tool_call_started( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: u32, tool_call_id: impl Into<String>, tool_name: impl Into<String>, arguments: Value, ) -> Self
pub fn tool_call_completed( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: Option<u32>, tool_call_id: impl Into<String>, tool_name: impl Into<String>, status: ToolStatus, ) -> Self
pub fn approval_requested( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, request_id: impl Into<String>, tool_call_id: impl Into<String>, tool_name: impl Into<String>, preview: impl Into<String>, ) -> Self
pub fn memory_compact_started( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: u32, message_count: usize, estimated_tokens: Option<u64>, ) -> Self
pub fn memory_compact_completed( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, cycle_index: u32, before_count: usize, after_count: usize, summary_tokens: Option<u64>, ) -> Self
pub fn handoff_completed( run_id: impl Into<String>, trace_id: impl Into<String>, source_agent: impl Into<String>, target_agent: impl Into<String>, tool_call_id: impl Into<String>, ) -> Self
pub fn run_completed( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, status: AgentStatus, ) -> Self
pub fn run_failed( run_id: impl Into<String>, trace_id: impl Into<String>, agent_name: impl Into<String>, error: AgentErrorPayload, ) -> Self
pub fn version(&self) -> &RunEventVersion
pub fn event_id(&self) -> &EventId
pub fn run_id(&self) -> &str
pub fn trace_id(&self) -> &str
pub fn session_id(&self) -> Option<&str>
pub fn parent_event_id(&self) -> Option<&str>
pub fn parent_run_id(&self) -> Option<&str>
pub fn created_at_ms(&self) -> u128
pub fn cycle_index(&self) -> Option<u32>
pub fn agent_name(&self) -> Option<&str>
pub fn payload(&self) -> &RunEventPayload
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_parent_event_id(self, parent_event_id: impl Into<String>) -> Self
pub fn with_parent_run_id(self, parent_run_id: impl Into<String>) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunEvent
impl<'de> Deserialize<'de> for RunEvent
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
impl StructuralPartialEq for RunEvent
Auto Trait Implementations§
impl Freeze for RunEvent
impl RefUnwindSafe for RunEvent
impl Send for RunEvent
impl Sync for RunEvent
impl Unpin for RunEvent
impl UnsafeUnpin for RunEvent
impl UnwindSafe for RunEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.