pub trait KeyDe: Sized {
// Required method
fn decode_key(bytes: &[u8]) -> Result<Self>;
}Expand description
A trait for decoding keys.
Required Methods§
Sourcefn decode_key(bytes: &[u8]) -> Result<Self>
fn decode_key(bytes: &[u8]) -> Result<Self>
Decodes a key from a byte slice.
Returns Err when the bytes are invalid. VSDB collections use
assert-style unwraps on this internally because data they wrote is always
trusted — see module-level trust model.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".