pub struct UcmEvent {
pub event_id: Uuid,
pub timestamp: DateTime<Utc>,
pub causation_id: Option<Uuid>,
pub schema_version: u32,
pub payload: EventPayload,
}Expand description
A mutation event in the context graph’s append-only log.
Every field change, relationship addition, or confidence update is captured as a typed event with full provenance.
Fields§
§event_id: UuidUnique event identifier (UUID v7 for time-ordering)
timestamp: DateTime<Utc>When this event occurred
causation_id: Option<Uuid>Which event caused this one (for causation chains)
schema_version: u32Schema version for upcasting support
payload: EventPayloadThe actual mutation
Implementations§
Source§impl UcmEvent
impl UcmEvent
Sourcepub fn new(payload: EventPayload) -> Self
pub fn new(payload: EventPayload) -> Self
Create a new event with auto-generated UUID v7 and current timestamp.
Sourcepub fn caused_by(payload: EventPayload, parent: Uuid) -> Self
pub fn caused_by(payload: EventPayload, parent: Uuid) -> Self
Create a new event with a causation chain link.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UcmEvent
impl<'de> Deserialize<'de> for UcmEvent
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 UcmEvent
impl RefUnwindSafe for UcmEvent
impl Send for UcmEvent
impl Sync for UcmEvent
impl Unpin for UcmEvent
impl UnsafeUnpin for UcmEvent
impl UnwindSafe for UcmEvent
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