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§
Sourcefn encode_key(&self, out: &mut Vec<u8>)
fn encode_key(&self, out: &mut Vec<u8>)
Appends the key’s bytes to out.
Sourcefn decode_key(bytes: &[u8]) -> Option<Self>
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".