infer

Function is_image

Source
pub fn is_image(buf: &[u8]) -> bool
Expand description

Determines whether a buffer is an image type.

ยงExamples

let v = [0xFF, 0xD8, 0xFF, 0xAA];
assert!(infer::is_image(&v));