macro_toolset::string::b64_padding

Struct URL_SAFE

Source
pub struct URL_SAFE;
👎Deprecated since 0.8.0-rc.1: Use string_v2 instead, v1 will be removed in 0.9.0.
Expand description

Base64 Padding: URL_SAFE

Implementations§

Source§

impl URL_SAFE

Source

pub fn encode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Encode>

👎Deprecated since 0.8.0-rc.1: Use string_v2 instead, v1 will be removed in 0.9.0.

Create a new Base64Str, and finally encode it to a Base64 string.

Source

pub fn decode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Decode>

👎Deprecated since 0.8.0-rc.1: Use string_v2 instead, v1 will be removed in 0.9.0.

Create a new Base64Str, and finally decode the inner Base64 string.

Notice: will do nothing if the decoded string is not valid UTF-8 encoded. If that is acceptable, use decode_to_any.

Source

pub unsafe fn decode_to_any<T: AsRef<[u8]>>( inner: T, ) -> Base64Str<T, URL_SAFE, DecodeToAny>

👎Deprecated since 0.8.0-rc.1: Use string_v2 instead, v1 will be removed in 0.9.0.

Create a new Base64Str, and finally decode the inner Base64 string.

§Safety

Calling this means the decoded string can be invalid UTF-8.

Source

pub fn decode_to_hex<T: AsRef<[u8]>>( inner: T, ) -> Base64Str<T, URL_SAFE, DecodeToHex>

👎Deprecated since 0.8.0-rc.1: Use string_v2 instead, v1 will be removed in 0.9.0.

Create a new Base64Str, and finally decode the inner Base64 string.

Notice: will do nothing if the inner string is not a valid Base64 string.

Trait Implementations§

Source§

impl Debug for URL_SAFE

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T