pub struct WalSegmentEnvelope {
pub kind: WalEnvelopeKind,
pub format_version: u32,
pub payload_checksum: String,
pub payload: WalSegmentPayload,
}Expand description
In-memory view of a WAL segment envelope.
This struct is not the durable layout; durable bytes are produced only by
encode_wal_segment_envelope_zstd and validated only by
decode_wal_segment_envelope_zstd.
Fields§
§kind: WalEnvelopeKindDurable-family discriminator checked before payload decoding.
format_version: u32Family-local format version, which must equal WAL_FORMAT_VERSION.
payload_checksum: StringDigest of the encoded payload bytes exactly as stored in the durable
document, in sha256:<hex> form.
payload: WalSegmentPayloadDecoded namespace segment content protected by payload_checksum.
Implementations§
Source§impl WalSegmentEnvelope
impl WalSegmentEnvelope
Sourcepub fn from_payload(
payload: WalSegmentPayload,
) -> Result<Self, EnvelopeCodecError>
pub fn from_payload( payload: WalSegmentPayload, ) -> Result<Self, EnvelopeCodecError>
Builds a versioned envelope and computes its checksum from canonical CBOR payload bytes.
Construction fails when the payload cannot be encoded.
Sourcepub fn pointer(&self, object_key: String) -> WalSegmentPointer
pub fn pointer(&self, object_key: String) -> WalSegmentPointer
Projects the integrity and sequence metadata needed to link this stored segment from a head.
Trait Implementations§
Source§impl Clone for WalSegmentEnvelope
impl Clone for WalSegmentEnvelope
Source§fn clone(&self) -> WalSegmentEnvelope
fn clone(&self) -> WalSegmentEnvelope
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 WalSegmentEnvelope
impl Debug for WalSegmentEnvelope
Source§impl<'de> Deserialize<'de> for WalSegmentEnvelope
impl<'de> Deserialize<'de> for WalSegmentEnvelope
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 WalSegmentEnvelope
Source§impl PartialEq for WalSegmentEnvelope
impl PartialEq for WalSegmentEnvelope
Source§impl Serialize for WalSegmentEnvelope
impl Serialize for WalSegmentEnvelope
impl StructuralPartialEq for WalSegmentEnvelope
Auto Trait Implementations§
impl Freeze for WalSegmentEnvelope
impl RefUnwindSafe for WalSegmentEnvelope
impl Send for WalSegmentEnvelope
impl Sync for WalSegmentEnvelope
impl Unpin for WalSegmentEnvelope
impl UnsafeUnpin for WalSegmentEnvelope
impl UnwindSafe for WalSegmentEnvelope
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