Function infer::is_image[][src]

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));