Skip to main content

const_content_type_from_ext

Function const_content_type_from_ext 

Source
pub fn const_content_type_from_ext(ext: &str) -> &'static str
Available on crate feature optimized only.
Expand description

Branch-optimized extension to content type lookup for hot paths.

§Examples

use http_handle::optimized::const_content_type_from_ext;
assert_eq!(const_content_type_from_ext("wasm"), "application/wasm");

§Panics

This function does not panic.