Skip to main content

BytesCodec

Derive Macro BytesCodec 

Source
#[derive(BytesCodec)]
Expand description

Derives the BytesCodec trait for variable-length encoding.

Automatically implements encoding and decoding for structs and enums.

§Example

#[derive(BytesCodec)]
struct Record {
    id: u64,
    name: String,
}