#[repr(transparent)]
pub struct Base64Url(_);
Expand description

Owned data to be encoded as URL-safe base64 (no padding)

Encoding alphabet: AZ, az, 09, -, _

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.

Implementations of the From trait assume that assume that the underlying structure is in raw form.

Implementations

Creates an empty buffer

Creates a new buffer from an owned value

This function has no cost for Vec<u8>. Other types incur the cost of copying into a buffer.

To decode a base64-encoded buffer, use from_encoded().

Constructs a new buffer from a base64-encoded slice

This function will decode the slice into a new owned buffer.

If the underlying buffer has already been decoded, then transparently wrap the buffer using from_raw().

Unwraps the underlying buffer

Provides access to the underlying buffer as a vector

Provides mutable access to the underlying buffer as a vector

Calculates the expected length of the base64-encoding for a buffer of size len

Methods from Deref<Target = Base64UrlRef>

Calculates the expected length of the base64-encoding of this buffer

Provides access to the underlying slice

Provides mutable access to the underlying slice

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Deserialize a base64 string and decode it into a byte array

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize the underlying byte array as a base64 string

Serialize this value into the given Serde serializer. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.