#[non_exhaustive]pub enum Charset {
Utf8,
Ascii,
Unspecified,
Other,
}Expand description
The charset a part declared.
Unspecified means no charset parameter: UTF-8 is assumed unless a
_charset_ field before the part said otherwise. Other is any label
that is not UTF-8 or US-ASCII; its text is refused by every text accessor.
§Examples
use form_net::Charset;
assert_eq!(mp.parts()[0].content_type().unwrap().charset(), Charset::Utf8);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
impl Copy for Charset
impl Eq 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 UnsafeUnpin 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