pub trait Key<'a>: Sized + AsRef<[u8]> {
// Required method
fn from_raw_key(r: &'a Raw) -> Result<Self, Error>;
// Provided method
fn to_raw_key(&self) -> Result<Raw, Error> { ... }
}
Expand description
A Key can be used as a key to a database
Required Methods§
sourcefn from_raw_key(r: &'a Raw) -> Result<Self, Error>
fn from_raw_key(r: &'a Raw) -> Result<Self, Error>
Convert from Raw