pub struct Event {
pub event_id: String,
pub timestamp: DateTime<Utc>,
pub event_type: EventType,
pub task_id: Option<String>,
pub content: Content,
pub duration_ms: Option<u64>,
pub attributes: HashMap<String, Value>,
}Expand description
A single event in the flat timeline
Fields§
§event_id: StringUnique event identifier
timestamp: DateTime<Utc>When this event occurred
event_type: EventTypeType of event
task_id: Option<String>Optional task grouping ID
content: ContentMultimodal content
duration_ms: Option<u64>Duration in milliseconds (for tool calls, etc.)
attributes: HashMap<String, Value>Arbitrary metadata
Implementations§
Source§impl Event
impl Event
Sourcepub fn attr_str(&self, key: &str) -> Option<&str>
pub fn attr_str(&self, key: &str) -> Option<&str>
Return an attribute as trimmed string, ignoring empty values.
Sourcepub fn source_schema_version(&self) -> Option<&str>
pub fn source_schema_version(&self) -> Option<&str>
Return canonical source schema version (source.schema_version) if present.
Sourcepub fn source_raw_type(&self) -> Option<&str>
pub fn source_raw_type(&self) -> Option<&str>
Return canonical source raw type (source.raw_type) if present.
Sourcepub fn semantic_group_id(&self) -> Option<&str>
pub fn semantic_group_id(&self) -> Option<&str>
Return canonical semantic group id (semantic.group_id) if present.
Sourcepub fn semantic_tool_kind(&self) -> Option<&str>
pub fn semantic_tool_kind(&self) -> Option<&str>
Return canonical semantic tool kind (semantic.tool_kind) if present.
Sourcepub fn semantic_call_id(&self) -> Option<&str>
pub fn semantic_call_id(&self) -> Option<&str>
Resolve a stable tool call id for correlation.
Resolution order:
semantic.call_idToolResult.call_id- legacy
call_idattribute
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 UnsafeUnpin 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