pub struct SmallBytes { /* private fields */ }Expand description
Option<Box<[u8]>> with inlining of <= size_of::<*mut u8>() bytes.
Implementations§
Source§impl SmallBytes
impl SmallBytes
pub const NULL: SmallBytes
pub fn from_slice(slice: &[u8]) -> Self
pub fn from_opt_slice(slice: Option<&[u8]>) -> Self
Trait Implementations§
Source§impl Debug for SmallBytes
impl Debug for SmallBytes
Source§impl Drop for SmallBytes
impl Drop for SmallBytes
Source§impl Hash for SmallBytes
impl Hash for SmallBytes
Source§impl PartialEq for SmallBytes
impl PartialEq for SmallBytes
impl Eq for SmallBytes
impl Send for SmallBytes
impl Sync for SmallBytes
Auto Trait Implementations§
impl Freeze for SmallBytes
impl RefUnwindSafe for SmallBytes
impl Unpin for SmallBytes
impl UnwindSafe for SmallBytes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more