Enum encoded_words::Charset
source · [−]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
Ascii
Utf7
Unknown8Bit
Encoding(&'static Encoding)
Implementations
sourceimpl 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 RefUnwindSafe for Charset
impl Send for Charset
impl Sync for Charset
impl Unpin for Charset
impl UnwindSafe for Charset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more