Registry / utility / new-mime-guess

new-mime-guess

JSON →
library4.0.4rscratesunverified

Associates MIME types with file extensions, providing a simple lookup interface.

# Cargo.toml [dependencies] new_mime_guess = "4.0.4"
INSTALL
IMPORT
SIG · NEW-MIME-GUESS
N
new-mime-guess
utilityrustv4.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from_ext
use new_mime_guess::from_ext;

Looks up the MIME type for a file extension.

use new_mime_guess::from_ext; fn main() { let mime = from_ext("html").unwrap_or_else(|| "application/octet-stream".parse().unwrap()); println!("MIME type: {}", mime); }
Debug
Known issues
gotchaThis crate is a fork of the unmaintained `mime_guess`; may have limited updates.
fix
Check for newer alternatives like `mime_guess2`.
affects: >=4.0.0
Upgrade
Version history
4.0.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
new-mime-guess — cargo add new-mime-guess · libregistry