pub fn guess_dcs(dcs: impl Borrow<DcString>) -> Result<FormatId>Expand description
Guesses the authoritative format for a given DcString.
ยงExamples
use ctb_formats_detection::{guess_dcs, DcString, FormatId};
let dcs = DcString::from_dcutf(
b"<!DOCTYPE html><html><body>Test</body></html>".to_vec(),
)?;
let format = guess_dcs(&dcs)?;
assert_eq!(format, FormatId::Html);