pub struct Event {
pub id: Uuid,
pub namespace: String,
pub verb: String,
pub substrate: SubstrateKind,
pub actor: String,
pub outcome: EventOutcome,
pub data: Option<Value>,
pub duration_us: i64,
pub target_id: Option<Uuid>,
pub created_at: i64,
}Expand description
Storage-level event record. Every verb execution produces one. Immutable once appended — no update or soft-delete.
Fields§
§id: Uuid§namespace: String§verb: String§substrate: SubstrateKind§actor: String§outcome: EventOutcome§data: Option<Value>§duration_us: i64§target_id: Option<Uuid>§created_at: i64Implementations§
Source§impl Event
impl Event
pub fn new( namespace: impl Into<String>, verb: impl Into<String>, substrate: SubstrateKind, actor: impl Into<String>, ) -> Self
pub fn with_outcome(self, o: EventOutcome) -> Self
pub fn with_data(self, d: Value) -> Self
pub fn with_duration_us(self, us: i64) -> Self
pub fn with_target(self, id: Uuid) -> 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 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