[−][src]Struct haiku::storage::MimeType
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,