Struct mas_oidc_client::jose::Base64
source · pub struct Base64<C = Base64> { /* private fields */ }
Expand description
A wrapper around Vec<u8>
that (de)serializes from / to a base64 string.
The generic parameter C
represents the base64 flavor.
Implementations§
source§impl<C> Base64<C>where
C: Encoding,
impl<C> Base64<C>where
C: Encoding,
sourcepub fn new(bytes: Vec<u8>) -> Base64<C>
pub fn new(bytes: Vec<u8>) -> Base64<C>
Create a Base64
instance from raw bytes, to be base64-encoded in
serialization.
sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Get a reference to the raw bytes held by this Base64
instance.
sourcepub fn encode(&self) -> String
pub fn encode(&self) -> String
Encode the bytes contained in this Base64
instance to unpadded base64.
sourcepub fn into_inner(self) -> Vec<u8> ⓘ
pub fn into_inner(self) -> Vec<u8> ⓘ
Get the raw bytes held by this Base64
instance.
Trait Implementations§
source§impl<'de, C> Deserialize<'de> for Base64<C>where
C: Encoding,
impl<'de, C> Deserialize<'de> for Base64<C>where
C: Encoding,
source§fn deserialize<D>(
deserializer: D,
) -> Result<Base64<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Base64<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C> Ord for Base64<C>where
C: Ord,
impl<C> Ord for Base64<C>where
C: Ord,
source§impl<C> PartialEq for Base64<C>where
C: PartialEq,
impl<C> PartialEq for Base64<C>where
C: PartialEq,
source§impl<C> PartialOrd for Base64<C>where
C: PartialOrd,
impl<C> PartialOrd for Base64<C>where
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<C> Serialize for Base64<C>where
C: Encoding,
impl<C> Serialize for Base64<C>where
C: Encoding,
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<C> Eq for Base64<C>where
C: Eq,
impl<C> StructuralPartialEq for Base64<C>
Auto Trait Implementations§
impl<C> Freeze for Base64<C>
impl<C> RefUnwindSafe for Base64<C>
impl<C> Send for Base64<C>
impl<C> Sync for Base64<C>
impl<C> Unpin for Base64<C>
impl<C> UnwindSafe for Base64<C>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.