pub enum MimeClass {
Html,
Json,
Xml,
Markdown,
Text,
Binary,
Unknown,
}Expand description
Coarse MIME classification. Two responses count as “same class” only
if they share the same variant — the String form (e.g.
text/html; charset=utf-8) is normalised to the variant.
Variants§
Html
HTML / XHTML documents.
Json
JSON documents (including vendor +json suffixes).
Xml
XML documents (including vendor +xml suffixes).
Markdown
Markdown documents — the canonical publisher-cloaking target.
Text
Plain text documents.
Binary
Binary payloads (images, audio, video, application/octet-stream,
application/pdf).
Unknown
Anything else — empty, malformed, or a content type the classifier doesn’t recognise.
Implementations§
Trait Implementations§
impl Copy for MimeClass
Source§impl<'de> Deserialize<'de> for MimeClass
impl<'de> Deserialize<'de> for MimeClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MimeClass
impl StructuralPartialEq for MimeClass
Auto Trait Implementations§
impl Freeze for MimeClass
impl RefUnwindSafe for MimeClass
impl Send for MimeClass
impl Sync for MimeClass
impl Unpin for MimeClass
impl UnsafeUnpin for MimeClass
impl UnwindSafe for MimeClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.