[][src]Struct haiku::storage::MimeType

pub struct MimeType { /* fields omitted */ }

Represents a mime type as defined by RFC 6838

Methods

impl MimeType[src]

pub fn new(mime_type: &str) -> Option<Self>[src]

Create a MimeType based on a string

The entered data is validated. A MimeType is only created when the data is valid, otherwise you will receive None.

pub fn is_supertype_only(&self) -> bool[src]

Check if the mime type only defines the super type

pub fn get_supertype(&self) -> MimeType[src]

Get the super type of this mimetype

For example, text/plain will return text.

Trait Implementations

impl PartialEq<MimeType> for MimeType[src]

impl StructuralPartialEq for MimeType[src]

Auto Trait Implementations

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> From<T> for T[src]

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

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.