#[non_exhaustive]pub enum Charset {
Utf8,
Iso8859_1,
UsAscii,
}Expand description
The charsets RFC 8187 values are decoded from.
§Examples
use parse_net::{Charset, ExtValue};
assert_eq!(ExtValue::parse(b"iso-8859-1''%A3")?.charset(), Charset::Iso8859_1);
assert_eq!(ExtValue::parse(b"US-ASCII''abc")?.charset(), Charset::UsAscii);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.
Utf8
UTF-8, the charset producers must use (RFC 8187 section 3.2.1).
Iso8859_1
ISO-8859-1, decoded only (D-010).
UsAscii
US-ASCII, decoded only: a decoded byte above 0x7F is refused (D-058).
Trait Implementations§
impl Copy for Charset
impl Eq for Charset
impl StructuralPartialEq for Charset
Auto Trait Implementations§
impl Forget for Charset
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