pub struct ContentTypes { /* private fields */ }Expand description
Content type mappings for package parts.
Maps file extensions and specific part names to MIME types.
Implementations§
Source§impl ContentTypes
impl ContentTypes
Sourcepub fn add_default(&mut self, extension: &str, content_type: &str)
pub fn add_default(&mut self, extension: &str, content_type: &str)
Add a default content type mapping.
Sourcepub fn add_override(&mut self, part_name: &str, content_type: &str)
pub fn add_override(&mut self, part_name: &str, content_type: &str)
Add an override content type mapping.
Trait Implementations§
Source§impl Clone for ContentTypes
impl Clone for ContentTypes
Source§fn clone(&self) -> ContentTypes
fn clone(&self) -> ContentTypes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentTypes
impl Debug for ContentTypes
Source§impl Default for ContentTypes
impl Default for ContentTypes
Source§fn default() -> ContentTypes
fn default() -> ContentTypes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContentTypes
impl RefUnwindSafe for ContentTypes
impl Send for ContentTypes
impl Sync for ContentTypes
impl Unpin for ContentTypes
impl UnsafeUnpin for ContentTypes
impl UnwindSafe for ContentTypes
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