pub struct Charset<'a>(pub &'a str);
Expand description
Represents a struct for handling both encode and decode of strings
using a custom character set (charset
). This struct provides methods to
encode and decode strings based on the provided charset
.
§Fields
charset
: A reference to the character set used for encoding and decoding. Each character in thecharset
should be unique and ideally contain exactly 64 characters for base64-like encoding.
§Lifetimes
'a
: The lifetime'a
is associated withcharset
, ensuring that thecharset
reference lives at least as long as theCharset
instance.
Tuple Fields§
§0: &'a str
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Charset<'a>
impl<'a> RefUnwindSafe for Charset<'a>
impl<'a> Send for Charset<'a>
impl<'a> Sync for Charset<'a>
impl<'a> Unpin for Charset<'a>
impl<'a> UnwindSafe for Charset<'a>
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