Function infer::is_document[][src]

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

Determines whether a buffer is a document type.

Examples

use std::fs;
assert!(infer::is_document(&fs::read("testdata/sample.docx").unwrap()));