pub struct EncodedPayload {
pub payload: Bytes,
pub index_keys: Vec<IndexKey>,
pub payload_type: Option<PayloadType>,
}Expand description
The canonical payload plus sidecar indices an encoder produces for one captured message.
The encoder does not stamp seq, ts_publish, or entry_hash: those are writer-side
fields. It also does not stamp headers; the bus capture adapter carries headers from
the dispatch boundary so encoders stay focused on payload identity.
payload_type is None for the typical bare-type encoder (e.g. SubmitOrder): the
registry’s registered tag is used. Envelope encoders that dispatch on a wrapper enum
(e.g. TradingCommand, OrderEventAny) set it to the inner-variant’s canonical tag
so forensics scans see entries identical to the bare-type capture path.
Fields§
§payload: BytesThe canonical encoded bytes the writer commits as the entry payload.
index_keys: Vec<IndexKey>Sidecar index keys produced for this entry. May be empty.
payload_type: Option<PayloadType>Optional override for the registry’s registered payload type tag. Set by envelope encoders to stamp the inner-variant tag on captured entries.
Implementations§
Source§impl EncodedPayload
impl EncodedPayload
Sourcepub const fn new(payload: Bytes, index_keys: Vec<IndexKey>) -> Self
pub const fn new(payload: Bytes, index_keys: Vec<IndexKey>) -> Self
Creates a new EncodedPayload that inherits the registry’s registered tag.
Sourcepub const fn without_indices(payload: Bytes) -> Self
pub const fn without_indices(payload: Bytes) -> Self
Creates a new EncodedPayload with no sidecar indices.
Sourcepub const fn with_payload_type(
payload_type: PayloadType,
payload: Bytes,
index_keys: Vec<IndexKey>,
) -> Self
pub const fn with_payload_type( payload_type: PayloadType, payload: Bytes, index_keys: Vec<IndexKey>, ) -> Self
Creates a new EncodedPayload that stamps payload_type on the captured entry,
overriding the registry’s registered tag.
Trait Implementations§
Source§impl Clone for EncodedPayload
impl Clone for EncodedPayload
Source§fn clone(&self) -> EncodedPayload
fn clone(&self) -> EncodedPayload
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 EncodedPayload
impl Debug for EncodedPayload
impl Eq for EncodedPayload
Source§impl PartialEq for EncodedPayload
impl PartialEq for EncodedPayload
Source§fn eq(&self, other: &EncodedPayload) -> bool
fn eq(&self, other: &EncodedPayload) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncodedPayload
Auto Trait Implementations§
impl !Freeze for EncodedPayload
impl RefUnwindSafe for EncodedPayload
impl Send for EncodedPayload
impl Sync for EncodedPayload
impl Unpin for EncodedPayload
impl UnsafeUnpin for EncodedPayload
impl UnwindSafe for EncodedPayload
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
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<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
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
§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
§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>
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