pub struct Bytes<T = Box<[u8]>, E = Base64UrlUnpadded> { /* private fields */ }Expand description
A serde wrapper for base64-encoded bytes.
§Type Parameters
T: The type used to store the byte data (e.g.,Vec<u8>,Box<[u8]>).E: The base64 encoding type (e.g.,Base64UrlUnpadded).
Trait Implementations§
Source§impl<'de, E: Encoding, const N: usize> Deserialize<'de> for Bytes<[u8; N], E>
impl<'de, E: Encoding, const N: usize> Deserialize<'de> for Bytes<[u8; N], E>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de, E: Encoding> Deserialize<'de> for Bytes<Box<[u8]>, E>
impl<'de, E: Encoding> Deserialize<'de> for Bytes<Box<[u8]>, E>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de, E: Encoding> Deserialize<'de> for Bytes<Vec<u8>, E>
impl<'de, E: Encoding> Deserialize<'de> for Bytes<Vec<u8>, E>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Ord, E: Ord> Ord for Bytes<T, E>
impl<T: Ord, E: Ord> Ord for Bytes<T, E>
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: PartialOrd, E: PartialOrd> PartialOrd for Bytes<T, E>
impl<T: PartialOrd, E: PartialOrd> PartialOrd for Bytes<T, E>
impl<T: Eq, E: Eq> Eq for Bytes<T, E>
impl<T, E> StructuralPartialEq for Bytes<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for Bytes<T, E>where
T: Freeze,
impl<T, E> RefUnwindSafe for Bytes<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for Bytes<T, E>
impl<T, E> Sync for Bytes<T, E>
impl<T, E> Unpin for Bytes<T, E>
impl<T, E> UnwindSafe for Bytes<T, E>where
T: UnwindSafe,
E: 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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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> 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> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)