pub struct Event {
pub wall_ts_us: i64,
pub agent: String,
pub itc: String,
pub parents: Vec<String>,
pub event_type: EventType,
pub item_id: ItemId,
pub data: EventData,
pub event_hash: String,
}Expand description
A single event in the bones event log.
Each event represents an immutable, content-addressed mutation to a work
item. Events form a Merkle-DAG via the parents field, enabling
causally-ordered CRDT replay.
§Fields (TSJSON column order)
wall_ts_us— wall-clock microseconds since Unix epochagent— identifier of the agent/user that produced the eventitc— Interval Tree Clock stamp (canonical text encoding)parents— parent event hashes (blake3:…), sorted lexicographicallyevent_type— one of the 11 event typesitem_id— the work item this event mutatesdata— typed payload (JSON in TSJSON, deserialized here)event_hash— BLAKE3 hash of fields 1–7
§Serde
Custom Deserialize implementation uses event_type to drive typed
deserialization of the data field. This is necessary because the type
discriminant is external to the JSON payload.
Fields§
§wall_ts_us: i64Wall-clock timestamp in microseconds since Unix epoch.
Monotonically increasing per-repo via the clock file.
agent: StringIdentifier of the agent or user that produced this event.
itc: StringInterval Tree Clock stamp in canonical text encoding.
Used for causal ordering independent of wall-clock time.
parents: Vec<String>Parent event hashes forming the Merkle-DAG.
Sorted lexicographically. Empty for the first event in a repo.
Format: ["blake3:abcdef...", ...]
event_type: EventTypeThe type of mutation this event represents.
item_id: ItemIdThe work item being mutated.
data: EventDataTyped payload data specific to the event type.
event_hash: StringBLAKE3 content hash of fields 1–7.
Format: blake3:<payload> (base64url in new writes). This is the
event’s identity in the
Merkle-DAG and is used for parent references, shard manifests,
and sync diffing.
Implementations§
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>,
impl Eq for Event
impl StructuralPartialEq for Event
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.