API reference¶
The complete public surface of mime, generated from the Doxygen
comments in the headers. If a symbol is missing here, either it’s internal
(under a detail namespace) or its header comment needs more love —
please open an issue.
This port is based on npm mime-types 3.0.2, mime-db 1.54.0,
and media-typer 1.1.0.
Module index¶
Behavior matrix¶
Function |
Accepted input |
Parameter handling |
Case normalization |
Return type |
Failure behavior |
|---|---|---|---|---|---|
File path, |
No |
Lowercases the extracted extension before lookup. |
|
Returns |
|
MIME type or extension. Path-like extension inputs without |
Existing parameters are preserved. If no real |
Extension lookup is case-insensitive. MIME type text is otherwise preserved; appended charset values are lowercase. |
|
Returns |
|
MIME type string, optionally with parameters. |
Strips leading whitespace and everything after the bare type, including
parameters after |
Lowercases the extracted media type before lookup. |
|
Returns |
|
MIME type string, optionally with parameters. |
Strips leading whitespace and everything after the bare type, including
parameters after |
Lowercases the extracted media type before lookup. |
|
Returns |
|
No input. |
Not applicable. |
Entries are generated in canonical lowercase extension order. |
|
Always returns the static generated span; no failure path. |
|
MIME type string, optionally with parameters. |
Strips leading whitespace and everything after the bare type, including
parameters after |
Lowercases the extracted media type before lookup. |
|
Returns an empty vector for empty, unknown, or extensionless types; does not throw. |
|
No input. |
Not applicable. |
Diagnostic entries use generated data casing. |
|
Always returns the static generated span; no failure path. |
|
Bare RFC 6838 media type, such as |
Does not accept full parameterized |
Lowercases the input and returned |
|
Throws |
|
|
Formats only the bare media type. An empty suffix omits |
Emits the component casing supplied by the caller. |
|
Validates each component and throws |
|
Bare RFC 6838 media type string, with optional leading and trailing C whitespace. |
Does not accept full parameterized |
Lowercases before validation. |
|
Returns |
Namespace overview¶
-
namespace mime¶