detect

Function detect 

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

Detects the MIME type of the given byte data.

This function examines the first 3072 bytes of the provided data to determine its MIME type using magic number detection.

§Arguments

  • data - A byte slice containing the data to analyze

§Returns

A reference to the detected MIME type