Trait pliantdb_local::core::schema::Key [−][src]
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 an IVec 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.
Implementations on Foreign Types
impl Key for i128[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<i128, Error>[src]
impl Key for String[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<String, Error>[src]
impl Key for ()[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(&[u8]) -> Result<(), Error>[src]
impl Key for i16[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<i16, Error>[src]
impl Key for i8[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<i8, Error>[src]
impl Key for i64[src]
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
pub fn from_big_endian_bytes(bytes: &[u8]) -> Result<i64, Error>[src]
impl<T> Key for Option<T> where
T: Key, [src]
T: Key,
pub fn as_big_endian_bytes(&self) -> Result<Cow<'_, [u8]>, Error>[src]
Panics
Panics if T::into_big_endian_bytes returns an empty IVec.