Skip to main content

detect_content_type

Function detect_content_type 

Source
pub fn detect_content_type(data: &[u8]) -> &'static str
Expand description

Inspect up to the first 512 bytes and return a MIME type string. Mirrors Go’s http.DetectContentType, which wraps sniff.go.