pub(crate) trait MimeExt {
// Required methods
fn has_suffix(&self, suffix: &str) -> bool;
fn clone(&self) -> Self;
fn from_ct(ct: ContentType) -> Self;
}
Expand description
Convenience methods to make the data_url Mime type more ergonomic.
Required Methods§
Sourcefn has_suffix(&self, suffix: &str) -> bool
fn has_suffix(&self, suffix: &str) -> bool
Checks that the subtype has a given suffix. Eg. image/svg+xml has the the xml suffix.
Sourcefn from_ct(ct: ContentType) -> Self
fn from_ct(ct: ContentType) -> Self
Build a Mime from the value of a Content-Type header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.