Trait sov_schema_db::schema::KeyEncoder
source · 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.