pub struct LedgerPayloadEnvelope { /* private fields */ }Expand description
LedgerPayloadEnvelope
Logical ledger payload envelope embedded inside one physically committed generation. This layer is decoded after physical dual-slot recovery selects a committed generation and before any allocation-ledger DTO is decoded.
This is an advanced protocol byte wrapper, not an authority token. Decoding
an envelope only classifies the logical payload; authority is established
later when crate::LedgerCommitStore routes the payload, checks
the current ledger format, validates committed ledger integrity, and returns
crate::RecoveredLedger.
Implementations§
Source§impl LedgerPayloadEnvelope
impl LedgerPayloadEnvelope
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Manually encode the logical payload envelope.
§Panics
Panics only on a platform where an in-memory payload length cannot fit
into the envelope’s u64 length field.
Sourcepub fn try_encode(&self) -> Result<Vec<u8>, LedgerPayloadEnvelopeError>
pub fn try_encode(&self) -> Result<Vec<u8>, LedgerPayloadEnvelopeError>
Try to encode the logical payload envelope.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, LedgerPayloadEnvelopeError>
pub fn decode(bytes: &[u8]) -> Result<Self, LedgerPayloadEnvelopeError>
Manually decode the logical payload envelope.
Trait Implementations§
Source§impl Clone for LedgerPayloadEnvelope
impl Clone for LedgerPayloadEnvelope
Source§fn clone(&self) -> LedgerPayloadEnvelope
fn clone(&self) -> LedgerPayloadEnvelope
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 LedgerPayloadEnvelope
impl Debug for LedgerPayloadEnvelope
impl Eq for LedgerPayloadEnvelope
Source§impl PartialEq for LedgerPayloadEnvelope
impl PartialEq for LedgerPayloadEnvelope
Source§fn eq(&self, other: &LedgerPayloadEnvelope) -> bool
fn eq(&self, other: &LedgerPayloadEnvelope) -> bool
self and other values to be equal, and is used by ==.