[−][src]Struct aliri_core::base64::Base64Url
Owned data to be encoded as URL-safe base64 (no padding)
Encoding alphabet: A
–Z
, a
–z
, 0
–9
, -
, _
Data is held in memory in its raw form. Costs of serialization are only incurred when serializing or displaying the value in its base64 representation.
Data is held in memory in its raw form. Costs of converting to
base64 form are only incurred when serializing or displaying the
value. Cost of converting from base64 form are incurred on calling
from_encoded
.
Implementations
impl Base64Url
[src]
pub fn from_raw<T: Into<Vec<u8>>>(raw: T) -> Self
[src]
Creates a new buffer from an owned value
To decode a base64-encoded buffer, use from_encoded
.
pub fn from_encoded<T: AsRef<[u8]>>(enc: T) -> Result<Self, InvalidBase64Data>
[src]
Constructs a new buffer from a base64-encoded slice
pub fn into_inner(self) -> Vec<u8>
[src]
Unwraps the underlying buffer
pub fn calc_encoded_len(len: usize) -> usize
[src]
Calculates the expected length of the base64-encoding for a buffer of size len
Methods from Deref<Target = Base64UrlRef>
pub fn encoded_len(&self) -> usize
[src]
Calculates the expected length of the base64-encoding of this buffer
pub const fn as_slice(&self) -> &[u8]
[src]
Provides access to the underlying slice
pub fn as_mut_slice(&mut self) -> &mut [u8]
[src]
Provides mutable access to the underlying slice
Trait Implementations
impl AsRef<Base64UrlRef> for Base64Url
[src]
fn as_ref(&self) -> &Base64UrlRef
[src]
impl Borrow<Base64UrlRef> for Base64Url
[src]
fn borrow(&self) -> &Base64UrlRef
[src]
impl Clone for Base64Url
[src]
impl Debug for Base64Url
[src]
impl Deref for Base64Url
[src]
type Target = Base64UrlRef
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl DerefMut for Base64Url
[src]
fn deref_mut(&mut self) -> &mut Base64UrlRef
[src]
impl<'de> Deserialize<'de> for Base64Url
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
impl Display for Base64Url
[src]
impl Eq for Base64Url
[src]
impl<'_> From<&'_ [u8]> for Base64Url
[src]
impl<'_> From<&'_ Base64UrlRef> for Base64Url
[src]
fn from(val: &Base64UrlRef) -> Self
[src]
impl From<Base64Url> for Vec<u8>
[src]
impl From<Vec<u8>> for Base64Url
[src]
impl Hash for Base64Url
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Base64Url> for Base64Url
[src]
impl PartialEq<Base64Url> for Base64UrlRef
[src]
impl PartialEq<Base64UrlRef> for Base64Url
[src]
fn eq(&self, other: &Base64UrlRef) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Base64Url
[src]
impl StructuralEq for Base64Url
[src]
impl StructuralPartialEq for Base64Url
[src]
Auto Trait Implementations
impl RefUnwindSafe for Base64Url
impl Send for Base64Url
impl Sync for Base64Url
impl Unpin for Base64Url
impl UnwindSafe for Base64Url
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,