pub trait KeyDecoder<S: Schema + ?Sized>:
Sized
+ PartialEq
+ Debug {
// Required method
fn decode_key(data: &[u8]) -> Result<Self>;
}
Expand description
Implementors of this trait can be used to decode keys in the given Schema
.
Required Methods§
Sourcefn decode_key(data: &[u8]) -> Result<Self>
fn decode_key(data: &[u8]) -> Result<Self>
Converts bytes fetched from RocksDB to Self
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.