pub struct EventRecord {Show 14 fields
pub event_id: EventId,
pub session_id: SessionId,
pub agent_id: AgentId,
pub branch_id: BranchId,
pub sequence: SeqNo,
pub timestamp: DateTime<Utc>,
pub actor: EventActor,
pub schema: EventSchema,
pub causation_id: Option<EventId>,
pub correlation_id: Option<String>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub digest: Option<String>,
pub kind: EventKind,
}Expand description
Convenience event record using chrono::DateTime<Utc> timestamps.
This is the type used by aiOS internal crates. It maps to EventEnvelope
for storage/streaming but uses ergonomic Rust types for construction.
Fields§
§event_id: EventId§session_id: SessionId§agent_id: AgentId§branch_id: BranchId§sequence: SeqNo§timestamp: DateTime<Utc>§actor: EventActor§schema: EventSchema§causation_id: Option<EventId>§correlation_id: Option<String>§trace_id: Option<String>§span_id: Option<String>§digest: Option<String>§kind: EventKindImplementations§
Source§impl EventRecord
impl EventRecord
Sourcepub fn new(
session_id: SessionId,
branch_id: BranchId,
sequence: SeqNo,
kind: EventKind,
) -> Self
pub fn new( session_id: SessionId, branch_id: BranchId, sequence: SeqNo, kind: EventKind, ) -> Self
Create a new event record with the current timestamp.
Sourcepub fn to_envelope(&self) -> EventEnvelope
pub fn to_envelope(&self) -> EventEnvelope
Convert to the canonical EventEnvelope for storage/streaming.
Trait Implementations§
Source§impl Clone for EventRecord
impl Clone for EventRecord
Source§fn clone(&self) -> EventRecord
fn clone(&self) -> EventRecord
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 moreSource§impl Debug for EventRecord
impl Debug for EventRecord
Source§impl<'de> Deserialize<'de> for EventRecord
impl<'de> Deserialize<'de> for EventRecord
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 EventRecord
impl RefUnwindSafe for EventRecord
impl Send for EventRecord
impl Sync for EventRecord
impl Unpin for EventRecord
impl UnsafeUnpin for EventRecord
impl UnwindSafe for EventRecord
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