Trait pliantdb_core::schema::view::map::Key [−][src]
A trait that enables a type to convert itself to a big-endian/network byte order.
Required methods
fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>>
[src]
Convert self
into an IVec
containing bytes ordered in big-endian/network byte order.
fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self>
[src]
Convert a slice of bytes into Self
by interpretting bytes
in big-endian/network byte order.
Implementations on Foreign Types
impl<'k> Key for Cow<'k, [u8]>
[src]
fn as_big_endian_bytes(&self) -> Result<Cow<'k, [u8]>>
[src]
fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self>
[src]
impl Key for Vec<u8>
[src]
fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>>
[src]
fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self>
[src]
impl Key for String
[src]
fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>>
[src]
fn from_big_endian_bytes(bytes: &[u8]) -> Result<Self>
[src]
impl Key for ()
[src]
fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>>
[src]
fn from_big_endian_bytes(_: &[u8]) -> Result<Self>
[src]
impl<T> Key for Option<T> where
T: Key,
[src]
T: Key,
fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>>
[src]
Panics
Panics if T::into_big_endian_bytes
returns an empty IVec
.