Struct aliri_base64::Base64Ref [−][src]
#[repr(transparent)]pub struct Base64Ref(_);
Borrowed data to be encoded as standard base64
Encoding alphabet: A
–Z
, a
–z
, 0
–9
, +
, /
Padding character: =
Data is borrowed in its raw form. Costs of converting to base64 form are only incurred when serializing or displaying the value.
Implementations
impl Base64Ref
[src]
impl Base64Ref
[src]pub fn from_slice(raw: &[u8]) -> &Self
[src]
Transparently reinterprets the slice as base64
pub fn from_mut_slice(raw: &mut [u8]) -> &mut Self
[src]
Transparently reinterprets the mutable slice as base64
pub const 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 Serialize for Base64Ref
[src]
impl Serialize for Base64Ref
[src]This is supported on crate feature
serde
only.Serialize the underlying byte array as a base64 string
impl StructuralEq for Base64Ref
[src]
impl StructuralEq for Base64Ref
[src]impl StructuralPartialEq for Base64Ref
[src]
impl StructuralPartialEq for Base64Ref
[src]Auto Trait Implementations
impl RefUnwindSafe for Base64Ref
impl RefUnwindSafe for Base64Ref
impl UnwindSafe for Base64Ref
impl UnwindSafe for Base64Ref