pub trait FromDatabaseBytes {
// Required method
fn from_key_bytes(bytes: &[u8]) -> Self
where Self: Sized;
// Provided method
fn from_value_bytes(bytes: &[u8]) -> Self
where Self: Sized { ... }
}Required Methods§
Sourcefn from_key_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_key_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Reads the value from the database key bytes. In the default implementation, this will also be used for the value bytes.
Provided Methods§
Sourcefn from_value_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_value_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Reads the value from the database bytes (in value encoding). This is only necessary if the value needs to be sorted differently in a dup table. DUP values use a lexicographic sort order.