DbMapKeyType

Trait DbMapKeyType 

Source
pub trait DbMapKeyType:
    Ord
    + Clone
    + Default
    + HashValue {
    // Required methods
    fn from_bytes(bytes: &[u8]) -> Self;
    fn signature() -> [u8; 8];
    fn as_bytes(&self) -> &[u8] ;
    fn cmp_u8(&self, other: &[u8]) -> Ordering;
}
Expand description

key type

Required Methods§

Source

fn from_bytes(bytes: &[u8]) -> Self

Convert a byte slice to Key.

Source

fn signature() -> [u8; 8]

Signature in header of database file.

Source

fn as_bytes(&self) -> &[u8]

Byte slice of data to be saved.

Source

fn cmp_u8(&self, other: &[u8]) -> Ordering

Compare with stored data

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.

Implementors§