pub struct EventStoreEntry {
pub entry_hash: EntryHash,
pub seq: u64,
pub headers: Headers,
pub topic: Topic,
pub payload_type: PayloadType,
pub payload: Bytes,
pub ts_init: UnixNanos,
pub ts_publish: UnixNanos,
}Expand description
One captured row in the event store: a state-affecting bus message plus metadata.
The fields cover the SPEC’s logical entry contract:
seqis the per-run monotonic sequence assigned by the writer at commit time. It is the replay-order authority.ts_initis the domain timestamp; strictly monotonic and unique system-wide via the sharedAtomicTime.ts_publishrecords when the writer received the entry (and, when populated by the bus, when the bus accepted it for fanout). Neither timestamp orders replay.topicandpayload_typedescribe the logical message identity; the writer commits them verbatim.payloadcarries the canonical bytes produced by the registered encoder.headerscarry first-class correlation metadata.entry_hashis the canonical hash recomputed on every read; mismatch quarantines the run.
Fields§
§entry_hash: EntryHashThe canonical hash over every preceding field.
seq: u64The per-run monotonic sequence; replay-order authority.
headers: HeadersFirst-class correlation headers.
topic: TopicThe logical bus topic this entry was captured on.
payload_type: PayloadTypeThe canonical payload type tag chosen by the bus capture adapter.
payload: BytesThe canonical encoded payload bytes.
ts_init: UnixNanosThe domain timestamp from AtomicTime.
ts_publish: UnixNanosThe bus-accepted or writer-receive timestamp.
Implementations§
Source§impl EventStoreEntry
impl EventStoreEntry
Sourcepub fn new(
entry_hash: EntryHash,
seq: u64,
headers: Headers,
topic: Topic,
payload_type: PayloadType,
payload: Bytes,
ts_init: UnixNanos,
ts_publish: UnixNanos,
) -> Self
pub fn new( entry_hash: EntryHash, seq: u64, headers: Headers, topic: Topic, payload_type: PayloadType, payload: Bytes, ts_init: UnixNanos, ts_publish: UnixNanos, ) -> Self
Creates a new EventStoreEntry with all fields supplied by the writer.
Sourcepub fn recompute_hash(&self) -> EntryHash
pub fn recompute_hash(&self) -> EntryHash
Recomputes the canonical hash for this entry from its current fields.
Backends call this on every read to validate entry_hash; mismatch quarantines the
run.
Trait Implementations§
Source§impl Clone for EventStoreEntry
impl Clone for EventStoreEntry
Source§fn clone(&self) -> EventStoreEntry
fn clone(&self) -> EventStoreEntry
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 moreSource§impl Debug for EventStoreEntry
impl Debug for EventStoreEntry
Source§impl<'de> Deserialize<'de> for EventStoreEntry
impl<'de> Deserialize<'de> for EventStoreEntry
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
impl Eq for EventStoreEntry
Source§impl PartialEq for EventStoreEntry
impl PartialEq for EventStoreEntry
Source§fn eq(&self, other: &EventStoreEntry) -> bool
fn eq(&self, other: &EventStoreEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EventStoreEntry
impl Serialize for EventStoreEntry
impl StructuralPartialEq for EventStoreEntry
Auto Trait Implementations§
impl !Freeze for EventStoreEntry
impl RefUnwindSafe for EventStoreEntry
impl Send for EventStoreEntry
impl Sync for EventStoreEntry
impl Unpin for EventStoreEntry
impl UnsafeUnpin for EventStoreEntry
impl UnwindSafe for EventStoreEntry
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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