pub enum Charset {
Ascii,
Utf7,
Unknown8Bit,
Encoding(&'static Encoding),
}
Expand description
Map character sets to their email properties.
Provides information about the requirements imposed on email for a specific character set. Certain character sets must be encoded with quoted-printable or base64 when used in email headers or bodies. Certain character sets must be converted outright, and are not allowed in email.
Variants§
Implementations§
Source§impl Charset
impl Charset
pub fn name(&self) -> &'static str
pub fn for_label(label: &[u8]) -> Option<Self>
pub fn encode(self, input: &str) -> (Cow<'_, [u8]>, bool)
pub fn decode_without_bom_handling(self, bytes: &[u8]) -> (Cow<'_, str>, bool)
Sourcepub fn get_output_charset(self) -> Charset
pub fn get_output_charset(self) -> Charset
Return the output character set.
Trait Implementations§
impl Copy for Charset
impl StructuralPartialEq for Charset
Auto Trait Implementations§
impl Freeze for Charset
impl RefUnwindSafe for Charset
impl Send for Charset
impl Sync for Charset
impl Unpin for Charset
impl UnwindSafe for Charset
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