Skip to main content

RecordKey

Trait RecordKey 

Source
pub trait RecordKey: Sized {
    // Required methods
    fn encode_key(&self, out: &mut Vec<u8>);
    fn decode_key(bytes: &[u8]) -> Option<Self>;
}
Expand description

The part of a database key after the family prefix.

Required Methods§

Source

fn encode_key(&self, out: &mut Vec<u8>)

Appends the key’s bytes to out.

Source

fn decode_key(bytes: &[u8]) -> Option<Self>

The key from its bytes, or None when they are not a key of this type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§