pub struct URL_SAFE;
Expand description
Base64 Padding: URL_SAFE
Implementations§
Source§impl URL_SAFE
impl URL_SAFE
Sourcepub fn encode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Encode>
pub fn encode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Encode>
Create a new Base64Str
, and finally encode it to a Base64 string.
Sourcepub fn decode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Decode>
pub fn decode<T: AsRef<[u8]>>(inner: T) -> Base64Str<T, URL_SAFE, Decode>
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
.
Sourcepub unsafe fn decode_to_any<T: AsRef<[u8]>>(
inner: T,
) -> Base64Str<T, URL_SAFE, DecodeToAny>
pub unsafe fn decode_to_any<T: AsRef<[u8]>>( inner: T, ) -> Base64Str<T, URL_SAFE, DecodeToAny>
Sourcepub fn decode_to_hex<T: AsRef<[u8]>>(
inner: T,
) -> Base64Str<T, URL_SAFE, DecodeToHex>
pub fn decode_to_hex<T: AsRef<[u8]>>( inner: T, ) -> Base64Str<T, URL_SAFE, DecodeToHex>
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§
Auto Trait Implementations§
impl Freeze for URL_SAFE
impl RefUnwindSafe for URL_SAFE
impl Send for URL_SAFE
impl Sync for URL_SAFE
impl Unpin for URL_SAFE
impl UnwindSafe for URL_SAFE
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