Trait obkv::Key[][src]

pub trait Key: Copy {
    type BYTES: AsRef<[u8]> + for<'a> TryFrom<&'a [u8]>;

    const BYTES_SIZE: usize;

    fn to_be_bytes(&self) -> Self::BYTES;
fn from_be_bytes(array: Self::BYTES) -> Self; }
Expand description

A trait that represents a key, this key will be encoded to disk.

Associated Types

The array that will contain the bytes of the key.

Associated Constants

The number of bytes the BYTES array contains.

Required methods

Returns an array of the key bytes in big-endian.

Returns the key that corresponds to the given bytes array.

Implementations on Foreign Types

Implementors