pub struct Base64QuantumCodec { /* private fields */ }Expand description
Encodes and decodes one complete Base64 quantum.
A quantum maps exactly three raw bytes to four Base64 units. It does not
handle final short input groups or = padding; callers that process streams
must finalize those cases in a transcoder or facade layer.
Implementations§
Trait Implementations§
Source§impl Clone for Base64QuantumCodec
impl Clone for Base64QuantumCodec
Source§fn clone(&self) -> Base64QuantumCodec
fn clone(&self) -> Base64QuantumCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Codec for Base64QuantumCodec
impl Codec for Base64QuantumCodec
Source§fn min_units_per_value(&self) -> NonZeroUsize
fn min_units_per_value(&self) -> NonZeroUsize
Returns the four Base64 units needed for one complete quantum.
Source§fn max_units_per_value(&self) -> NonZeroUsize
fn max_units_per_value(&self) -> NonZeroUsize
Returns the four Base64 units needed for one complete quantum.
Source§unsafe fn decode_unchecked(
&self,
input: &[u8],
index: usize,
) -> Result<([u8; 3], NonZeroUsize), Self::DecodeError>
unsafe fn decode_unchecked( &self, input: &[u8], index: usize, ) -> Result<([u8; 3], NonZeroUsize), Self::DecodeError>
Decodes one complete four-unit Base64 quantum.
Source§unsafe fn encode_unchecked(
&self,
value: &[u8; 3],
output: &mut [u8],
index: usize,
) -> Result<usize, Self::EncodeError>
unsafe fn encode_unchecked( &self, value: &[u8; 3], output: &mut [u8], index: usize, ) -> Result<usize, Self::EncodeError>
Encodes one complete three-byte Base64 quantum.
Source§type DecodeError = MiscCodecError
type DecodeError = MiscCodecError
Error reported when decoding malformed units.
Source§type EncodeError = MiscCodecError
type EncodeError = MiscCodecError
Error reported when encoding an unsupported value.
impl Copy for Base64QuantumCodec
Source§impl Debug for Base64QuantumCodec
impl Debug for Base64QuantumCodec
Source§impl Default for Base64QuantumCodec
impl Default for Base64QuantumCodec
impl Eq for Base64QuantumCodec
Source§impl PartialEq for Base64QuantumCodec
impl PartialEq for Base64QuantumCodec
Source§fn eq(&self, other: &Base64QuantumCodec) -> bool
fn eq(&self, other: &Base64QuantumCodec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Base64QuantumCodec
Auto Trait Implementations§
impl Freeze for Base64QuantumCodec
impl RefUnwindSafe for Base64QuantumCodec
impl Send for Base64QuantumCodec
impl Sync for Base64QuantumCodec
impl Unpin for Base64QuantumCodec
impl UnsafeUnpin for Base64QuantumCodec
impl UnwindSafe for Base64QuantumCodec
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