pub struct Base64 { /* private fields */ }
Expand description

Implementations

Encodes src and writes to dst.

Errors

This function returns Err if:

  • The length of dst is not enough.

Decodes src and writes to dst.

Errors

This function returns Err if:

  • The length of dst is not enough.
  • The content of src is invalid.

Decodes buf and writes inplace.

Errors

This function returns Err if:

  • The content of buf is invalid.

When this function returns Err, the content of buf should be considered as fully broken.

Encodes src and returns Box<str>

Panics

This function panics if:

  • The encoded length of src is greater than isize::MAX

Decodes src and returns Box<[u8]>

Errors

This function returns Err if:

  • The content of src is invalid.

Standard charset with padding.

Standard charset without padding.

URL-safe charset with padding.

URL-safe charset without padding.

Calcuates the encoding length.

Panics

This function panics if any of the conditions below is not satisfied:

  • n <= isize::MAX

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.