[][src]Enum adblock::resources::MimeType

pub enum MimeType {
    ImageGif,
    TextHtml,
    ApplicationJavascript,
    AudioMp3,
    VideoMp4,
    ImagePng,
    TextPlain,
    Unknown,
}

Variants

ImageGif
TextHtml
ApplicationJavascript
AudioMp3
VideoMp4
ImagePng
TextPlain
Unknown

Implementations

impl MimeType[src]

pub fn from_extension(resource_path: &str) -> Self[src]

Infers a resource's MIME type according to the extension of its path

Trait Implementations

impl Clone for MimeType[src]

impl Debug for MimeType[src]

impl<'de> Deserialize<'de> for MimeType[src]

impl From<Cow<'static, str>> for MimeType[src]

impl From<MimeType> for String[src]

impl PartialEq<MimeType> for MimeType[src]

impl Serialize for MimeType[src]

impl StructuralPartialEq for MimeType[src]

Auto Trait Implementations

impl RefUnwindSafe for MimeType

impl Send for MimeType

impl Sync for MimeType

impl Unpin for MimeType

impl UnwindSafe for MimeType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.