pub struct Mime {
pub type_: String,
pub subtype: String,
pub parameters: Vec<(String, String)>,
}
Expand description
Fields§
§type_: String
§subtype: String
§parameters: Vec<(String, String)>
(name, value)
Implementations§
Source§impl Mime
impl Mime
Sourcepub fn new(type_: &str, subtype: &str) -> Self
pub fn new(type_: &str, subtype: &str) -> Self
Construct a new Mime
with the given type_
and subtype
and an
empty parameter list.
Sourcepub fn matches(&self, type_: &str, subtype: &str) -> bool
pub fn matches(&self, type_: &str, subtype: &str) -> bool
Return true if this Mime
matches a given type and subtype, regardless
of what parameters it has.
pub fn get_parameter<P>(&self, name: &P) -> Option<&str>
Trait Implementations§
impl Eq for Mime
impl StructuralPartialEq for Mime
Auto Trait Implementations§
impl Freeze for Mime
impl RefUnwindSafe for Mime
impl Send for Mime
impl Sync for Mime
impl Unpin for Mime
impl UnwindSafe for Mime
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