Struct drawbridge::bytes::Bytes
source · pub struct Bytes<T, C = Standard>(/* private fields */);
Expand description
A wrapper for bytes which provides base64 encoding in string contexts
Implementations§
source§impl<T, C> Bytes<T, C>
impl<T, C> Bytes<T, C>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the outer type, returning the inner type
Trait Implementations§
source§impl<'de, T, C> Deserialize<'de> for Bytes<T, C>
impl<'de, T, C> Deserialize<'de> for Bytes<T, C>
source§fn deserialize<D>(
deserializer: D
) -> Result<Bytes<T, C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Bytes<T, C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T, C> Ord for Bytes<T, C>
impl<T, C> Ord for Bytes<T, C>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T, C> PartialEq for Bytes<T, C>
impl<T, C> PartialEq for Bytes<T, C>
source§impl<T, C> PartialOrd for Bytes<T, C>where
T: PartialOrd,
C: PartialOrd,
impl<T, C> PartialOrd for Bytes<T, C>where
T: PartialOrd,
C: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T, C> Serialize for Bytes<T, C>
impl<T, C> Serialize for Bytes<T, C>
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T, C> Eq for Bytes<T, C>
impl<T, C> StructuralPartialEq for Bytes<T, C>
Auto Trait Implementations§
impl<T, C> Freeze for Bytes<T, C>where
T: Freeze,
impl<T, C> RefUnwindSafe for Bytes<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for Bytes<T, C>
impl<T, C> Sync for Bytes<T, C>
impl<T, C> Unpin for Bytes<T, C>
impl<T, C> UnwindSafe for Bytes<T, C>where
T: UnwindSafe,
C: UnwindSafe,
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
source§impl<T> FromFd for T
impl<T> FromFd for T
source§impl<T> FromFilelike for T
impl<T> FromFilelike for T
source§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given filelike object. Read moresource§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
Constructs a new instance of
Self
from the given filelike object
converted from into_owned
. Read moresource§impl<T> FromSocketlike for T
impl<T> FromSocketlike for T
source§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given socketlike object.source§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
Constructs a new instance of
Self
from the given socketlike object
converted from into_owned
.