Struct ruma_common::serde::base64::Base64
source · pub struct Base64<C = Standard, B = Vec<u8>> { /* private fields */ }Expand description
A wrapper around B (usually Vec<u8>) that (de)serializes from / to a base64 string.
The base64 character set (and miscellaneous other encoding / decoding options) can be customized
through the generic parameter C.
Implementations§
source§impl<C: Base64Config, B: AsRef<[u8]>> Base64<C, B>
impl<C: Base64Config, B: AsRef<[u8]>> Base64<C, B>
source§impl<C, B> Base64<C, B>
impl<C, B> Base64<C, B>
sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Get the raw bytes held by this Base64 instance.
Trait Implementations§
source§impl<'de, C: Base64Config> Deserialize<'de> for Base64<C>
impl<'de, C: Base64Config> Deserialize<'de> for Base64<C>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C: Ord, B: Ord> Ord for Base64<C, B>
impl<C: Ord, B: Ord> Ord for Base64<C, B>
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<C: PartialEq, B: PartialEq> PartialEq<Base64<C, B>> for Base64<C, B>
impl<C: PartialEq, B: PartialEq> PartialEq<Base64<C, B>> for Base64<C, B>
source§impl<C: PartialOrd, B: PartialOrd> PartialOrd<Base64<C, B>> for Base64<C, B>
impl<C: PartialOrd, B: PartialOrd> PartialOrd<Base64<C, B>> for Base64<C, B>
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 moreimpl<C: Eq, B: Eq> Eq for Base64<C, B>
impl<C, B> StructuralEq for Base64<C, B>
impl<C, B> StructuralPartialEq for Base64<C, B>
Auto Trait Implementations§
impl<C, B> RefUnwindSafe for Base64<C, B>where
B: RefUnwindSafe,
impl<C, B> Send for Base64<C, B>where
B: Send,
impl<C, B> Sync for Base64<C, B>where
B: Sync,
impl<C, B> Unpin for Base64<C, B>where
B: Unpin,
impl<C, B> UnwindSafe for Base64<C, B>where
B: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.