Skip to main content

guess

Function guess 

Source
pub fn guess(head: &[u8], whole: bool) -> Option<FileFormat>
Expand description

What unclaimed text is, from its first bytes head (whole when that is everything, so an unterminated last line is complete); None for non-text (hex view locally). JSON only if it parses so far; NDJSON if the first line is an object; CSV or TSV only if several complete records share a field count of two or more (CSV quoting allowed); otherwise lines.