pub struct WatchEventRecord {
pub entity_id: [u8; 16],
pub collective_id: [u8; 16],
pub event_type: WatchEventTypeTag,
pub timestamp_ms: i64,
pub entity_type: EntityTypeTag,
}Expand description
A persisted watch event for cross-process change detection (schema v2).
This is the on-disk representation — compact and self-contained.
Converted to the public WatchEvent type when returned to callers.
Uses raw byte arrays for IDs (not UUID wrappers) to keep serialization simple and avoid coupling the storage format to the public type system.
§Schema v2 Changes
In v1, this struct only tracked experiences (experience_id). In v2,
the field is renamed to entity_id and an entity_type discriminant
is added to track all entity types (relations, insights, collectives).
Fields§
§entity_id: [u8; 16]The entity that changed (16-byte UUID).
For experiences this is an ExperienceId, for relations a RelationId, etc.
collective_id: [u8; 16]The collective this entity belongs to (16-byte UUID).
event_type: WatchEventTypeTagWhat kind of change occurred.
timestamp_ms: i64When the change occurred (milliseconds since Unix epoch).
entity_type: EntityTypeTagWhat kind of entity changed (schema v2).
Trait Implementations§
Source§impl Clone for WatchEventRecord
impl Clone for WatchEventRecord
Source§fn clone(&self) -> WatchEventRecord
fn clone(&self) -> WatchEventRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchEventRecord
impl Debug for WatchEventRecord
Source§impl<'de> Deserialize<'de> for WatchEventRecord
impl<'de> Deserialize<'de> for WatchEventRecord
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>,
Source§impl From<WatchEventRecord> for WatchEvent
impl From<WatchEventRecord> for WatchEvent
Source§fn from(record: WatchEventRecord) -> Self
fn from(record: WatchEventRecord) -> Self
Auto Trait Implementations§
impl Freeze for WatchEventRecord
impl RefUnwindSafe for WatchEventRecord
impl Send for WatchEventRecord
impl Sync for WatchEventRecord
impl Unpin for WatchEventRecord
impl UnsafeUnpin for WatchEventRecord
impl UnwindSafe for WatchEventRecord
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more