archivist_lib::logs::socket

Trait Encoding

Source
pub trait Encoding {
    // Required method
    fn wrap_bytes(
        bytes: Vec<u8>,
        stats: &Arc<LogStreamStats>,
    ) -> Option<StoredMessage>;
}
Expand description

An Encoding is able to parse a Message from raw bytes.

Required Methods§

Source

fn wrap_bytes( bytes: Vec<u8>, stats: &Arc<LogStreamStats>, ) -> Option<StoredMessage>

Attempt to parse a message from the given buffer

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§