#[repr(u32)]pub enum PayloadCodec {
Raw = 0,
Zstd = 1,
}Expand description
Payload storage codec represented as a u32 on disk.
The numeric discriminants are part of the shared wire contract and must not be renumbered.
Variants§
Raw = 0
Stored bytes are the raw payload (stored_byte_len == raw_byte_len).
Zstd = 1
Stored bytes are one zstd frame decoding to raw_byte_len bytes.
Implementations§
Source§impl PayloadCodec
impl PayloadCodec
Sourcepub fn from_u32(value: u32) -> Result<Self, CodecError>
pub fn from_u32(value: u32) -> Result<Self, CodecError>
Convert a wire discriminant into a supported codec.
§Errors
Returns CodecError::Unsupported for unknown tags.
Trait Implementations§
Source§impl Clone for PayloadCodec
impl Clone for PayloadCodec
Source§fn clone(&self) -> PayloadCodec
fn clone(&self) -> PayloadCodec
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 moreimpl Copy for PayloadCodec
Source§impl Debug for PayloadCodec
impl Debug for PayloadCodec
impl Eq for PayloadCodec
Source§impl PartialEq for PayloadCodec
impl PartialEq for PayloadCodec
impl StructuralPartialEq for PayloadCodec
Auto Trait Implementations§
impl Freeze for PayloadCodec
impl RefUnwindSafe for PayloadCodec
impl Send for PayloadCodec
impl Sync for PayloadCodec
impl Unpin for PayloadCodec
impl UnsafeUnpin for PayloadCodec
impl UnwindSafe for PayloadCodec
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