#[non_exhaustive]pub struct VaultEventEnvelope {
pub epoch: String,
pub sequence: u64,
pub observed_at_ms: u64,
pub vault: String,
pub event: HookEvent,
pub content_hash: Option<String>,
pub plugin_id: Option<String>,
pub attribution: EventAttribution,
}Expand description
Sequenced event delivered to hook subscribers.
Sequence numbers are assigned and the envelope is enqueued inside one critical section, so subscribers observe events in sequence order.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.epoch: StringIdentifier of the bus run that issued Self::sequence.
See HookBus::epoch. Persist it alongside the sequence — an
EventCursor does this — or the number means nothing after a restart.
sequence: u64Sequence number, monotonic within Self::epoch and only there.
It counts from zero each time the host starts.
observed_at_ms: u64Observation time as Unix epoch milliseconds.
vault: StringVault name.
event: HookEventObserved mutation.
content_hash: Option<String>Content identity when it was available at observation time.
plugin_id: Option<String>Mounted plugin namespace the host attributes this write to.
Stamped by the host from the validated descriptor of the plugin whose
call produced the write, and not settable by the writer — unlike
WriteProvenance, which is advisory caller data. None means the
change did not come through a plugin. This is the field to use for loop
prevention: a plugin skips events whose plugin_id is its own.
attribution: EventAttributionBest-effort writer attribution.
Trait Implementations§
Source§impl Clone for VaultEventEnvelope
impl Clone for VaultEventEnvelope
Source§fn clone(&self) -> VaultEventEnvelope
fn clone(&self) -> VaultEventEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VaultEventEnvelope
impl Debug for VaultEventEnvelope
Source§impl<'de> Deserialize<'de> for VaultEventEnvelope
impl<'de> Deserialize<'de> for VaultEventEnvelope
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 VaultEventEnvelope
Source§impl PartialEq for VaultEventEnvelope
impl PartialEq for VaultEventEnvelope
Source§impl Serialize for VaultEventEnvelope
impl Serialize for VaultEventEnvelope
impl StructuralPartialEq for VaultEventEnvelope
Auto Trait Implementations§
impl Freeze for VaultEventEnvelope
impl RefUnwindSafe for VaultEventEnvelope
impl Send for VaultEventEnvelope
impl Sync for VaultEventEnvelope
impl Unpin for VaultEventEnvelope
impl UnsafeUnpin for VaultEventEnvelope
impl UnwindSafe for VaultEventEnvelope
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.