pub struct MimeKind(/* private fields */);Expand description
Bitmask flags representing different MIME type categories
A MIME type can belong to multiple categories (e.g., an executable can also be an archive). Use bitwise operations to combine or check for multiple kinds.
Implementations§
Source§impl MimeKind
impl MimeKind
Sourcepub const EXECUTABLE: MimeKind
pub const EXECUTABLE: MimeKind
Executable/binary formats (ELF, PE, Mach-O, WASM, etc.)
Sourcepub const APPLICATION: MimeKind
pub const APPLICATION: MimeKind
Application-specific formats (APK, JAR, MSI, etc.)
Sourcepub const SPREADSHEET: MimeKind
pub const SPREADSHEET: MimeKind
Spreadsheet formats (XLSX, ODS, CSV, etc.)
Sourcepub const PRESENTATION: MimeKind
pub const PRESENTATION: MimeKind
Presentation formats (PPTX, ODP, etc.)
Sourcepub const fn contains(&self, other: MimeKind) -> bool
pub const fn contains(&self, other: MimeKind) -> bool
Check if this kind contains the specified flag(s)
Sourcepub const fn union(self, other: MimeKind) -> MimeKind
pub const fn union(self, other: MimeKind) -> MimeKind
Combine this kind with another using bitwise OR
Sourcepub const fn is_archive(&self) -> bool
pub const fn is_archive(&self) -> bool
Check if this is an archive format
Sourcepub const fn is_document(&self) -> bool
pub const fn is_document(&self) -> bool
Check if this is a document format
Sourcepub const fn is_executable(&self) -> bool
pub const fn is_executable(&self) -> bool
Check if this is an executable/binary format
Sourcepub const fn is_application(&self) -> bool
pub const fn is_application(&self) -> bool
Check if this is an application-specific format
Sourcepub const fn is_database(&self) -> bool
pub const fn is_database(&self) -> bool
Check if this is a database format
Sourcepub const fn is_spreadsheet(&self) -> bool
pub const fn is_spreadsheet(&self) -> bool
Check if this is a spreadsheet format
Sourcepub const fn is_presentation(&self) -> bool
pub const fn is_presentation(&self) -> bool
Check if this is a presentation format