pub trait KeyEncoder<S: Schema + ?Sized>:
Sized
+ PartialEq
+ Debug {
// Required method
fn encode_key(&self) -> Result<Vec<u8>>;
}
Expand description
Implementors of this trait can be used to encode keys in the given Schema
.
Required Methods§
Sourcefn encode_key(&self) -> Result<Vec<u8>>
fn encode_key(&self) -> Result<Vec<u8>>
Converts self
to bytes to be stored in RocksDB.
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.