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> PartialOrd for Bytes<T, C>where
T: PartialOrd,
C: PartialOrd,
impl<T, C> PartialOrd for Bytes<T, C>where
T: PartialOrd,
C: PartialOrd,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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