Trait pliantdb_local::core::schema::Key[][src]

pub trait Key: Clone + Send + Sync {
    fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>;
fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self, Error>; }
Expand description

A trait that enables a type to convert itself to a big-endian/network byte order.

Required methods

Convert self into a Cow<[u8]> containing bytes ordered in big-endian/network byte order.

Convert a slice of bytes into Self by interpretting bytes in big-endian/network byte order.

Implementations on Foreign Types

Panics

Panics if T::into_big_endian_bytes returns an empty IVec.

Implementors