pub trait KeyEncoder {
// Required methods
fn encode_key(&self, key: &Value) -> Result<Vec<u8>>;
fn decode_key(&self, bytes: &[u8]) -> Result<(Value, usize)>;
}Expand description
Trait for ordered-binary key encoding.
Implementations must preserve lexicographic sort order in binary representation — critical for range queries to work correctly.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".