pub struct ForgivingBase64;Expand description
Exact WHATWG forgiving Base64 decoder.
Implementations§
Source§impl ForgivingBase64
impl ForgivingBase64
Sourcepub const fn decoder(self) -> ForgivingDecoder
pub const fn decoder(self) -> ForgivingDecoder
Constructs a fresh heapless incremental decoder.
Source§impl ForgivingBase64
impl ForgivingBase64
Sourcepub fn validate(self, input: &str) -> Result<(), ForgivingError>
pub fn validate(self, input: &str) -> Result<(), ForgivingError>
Validates one web string without returning decoded bytes.
Sourcepub fn decoded_len(self, input: &str) -> Result<usize, ForgivingError>
pub fn decoded_len(self, input: &str) -> Result<usize, ForgivingError>
Validates a web string and returns its exact decoded byte length.
Sourcepub fn decode_into(
self,
input: &str,
output: &mut [u8],
) -> Result<usize, ForgivingError>
pub fn decode_into( self, input: &str, output: &mut [u8], ) -> Result<usize, ForgivingError>
Decodes a web string into a caller-owned destination transactionally.
Full WHATWG validation and sizing happen before the first destination write. Every returned error leaves the complete destination unchanged.
Source§impl ForgivingBase64
impl ForgivingBase64
Sourcepub fn decode_to_vec(self, input: &str) -> Result<Vec<u8>, ForgivingError>
pub fn decode_to_vec(self, input: &str) -> Result<Vec<u8>, ForgivingError>
Decodes a web string into a newly allocated byte vector.
Sourcepub fn decode_to_vec_with_limit(
self,
input: &str,
max_output_len: usize,
) -> Result<Vec<u8>, ForgivingError>
pub fn decode_to_vec_with_limit( self, input: &str, max_output_len: usize, ) -> Result<Vec<u8>, ForgivingError>
Decodes subject to an exact caller-selected output limit.
Trait Implementations§
Source§impl Clone for ForgivingBase64
impl Clone for ForgivingBase64
Source§fn clone(&self) -> ForgivingBase64
fn clone(&self) -> ForgivingBase64
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 moreimpl Copy for ForgivingBase64
Source§impl Debug for ForgivingBase64
impl Debug for ForgivingBase64
Source§impl Default for ForgivingBase64
impl Default for ForgivingBase64
Source§fn default() -> ForgivingBase64
fn default() -> ForgivingBase64
Returns the “default value” for a type. Read more
impl Eq for ForgivingBase64
Source§impl Hash for ForgivingBase64
impl Hash for ForgivingBase64
Source§impl PartialEq for ForgivingBase64
impl PartialEq for ForgivingBase64
impl StructuralPartialEq for ForgivingBase64
Auto Trait Implementations§
impl Freeze for ForgivingBase64
impl RefUnwindSafe for ForgivingBase64
impl Send for ForgivingBase64
impl Sync for ForgivingBase64
impl Unpin for ForgivingBase64
impl UnsafeUnpin for ForgivingBase64
impl UnwindSafe for ForgivingBase64
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