pub fn resolve_format( bytes: &[u8], mime: Option<&str>, filename: Option<&str>, opts: &Options, ) -> Result<Format, DocError>
Determine the format: MIME type, then extension, then content sniffing.