pub struct EventEnvelope {
pub event_id: EventId,
pub stamp: FrameStamp,
pub kind: EventKind,
pub track_id: Option<TrackId>,
pub subject_id: Option<SubjectId>,
pub zone_id: Option<ZoneId>,
pub evidence: Option<EvidenceRef>,
pub payload: EventPayload,
}Expand description
Versioned, queryable event record for a VisionIndex.
This is the shared contract between tracking, analytics, storage, and host products. It does not embed pixels or edit instructions.
Fields§
§event_id: EventIdStable event id within an index document.
stamp: FrameStampTemporal and source stamp for the event.
kind: EventKindCoarse kind for filtering.
track_id: Option<TrackId>Optional track association.
subject_id: Option<SubjectId>Optional long-lived subject association.
zone_id: Option<ZoneId>Optional zone association (also often present in payload).
evidence: Option<EvidenceRef>Optional evidence handle for reels / audit.
payload: EventPayloadKind-specific payload.
Implementations§
Source§impl EventEnvelope
impl EventEnvelope
Sourcepub fn new(event_id: EventId, stamp: FrameStamp, kind: EventKind) -> Self
pub fn new(event_id: EventId, stamp: FrameStamp, kind: EventKind) -> Self
Creates an envelope with empty payload and no optional associations.
Sourcepub fn with_track(self, track_id: TrackId) -> Self
pub fn with_track(self, track_id: TrackId) -> Self
Builder-style track association.
Sourcepub fn with_subject(self, subject_id: SubjectId) -> Self
pub fn with_subject(self, subject_id: SubjectId) -> Self
Builder-style subject association.
Sourcepub fn with_evidence(self, evidence: EvidenceRef) -> Self
pub fn with_evidence(self, evidence: EvidenceRef) -> Self
Builder-style evidence handle.
Sourcepub fn with_payload(self, payload: EventPayload) -> Self
pub fn with_payload(self, payload: EventPayload) -> Self
Builder-style payload.
Trait Implementations§
Source§impl Clone for EventEnvelope
impl Clone for EventEnvelope
Source§fn clone(&self) -> EventEnvelope
fn clone(&self) -> EventEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EventEnvelope
Source§impl Debug for EventEnvelope
impl Debug for EventEnvelope
Source§impl PartialEq for EventEnvelope
impl PartialEq for EventEnvelope
impl StructuralPartialEq for EventEnvelope
Auto Trait Implementations§
impl Freeze for EventEnvelope
impl RefUnwindSafe for EventEnvelope
impl Send for EventEnvelope
impl Sync for EventEnvelope
impl Unpin for EventEnvelope
impl UnsafeUnpin for EventEnvelope
impl UnwindSafe for EventEnvelope
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