Trait pliantdb_local::core::schema::Key [−][src]
pub trait Key: Clone + Send + Sync { pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>; pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self, Error>; }
A trait that enables a type to convert itself to a big-endian/network byte order.
Required methods
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>
[src]
Convert self
into a Cow<[u8]>
containing bytes ordered in big-endian/network byte order.
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self, Error>
[src]
Convert a slice of bytes into Self
by interpretting bytes
in big-endian/network byte order.