Function content_inspector::inspect

source ·
pub fn inspect(buffer: &[u8]) -> ContentType
Expand description

Try to determine the type of content in the given buffer. See the crate documentation for a usage example and for more details on how this analysis is performed.

If the buffer is empty, the content type will be reported as UTF_8.