Skip to main content

inspect

Function inspect 

Source
pub fn inspect(input: &[u8], format: Format) -> Result<String, Box<dyn Error>>
Expand description

Prints a structural summary of an input document.

Reports the format, the number of top-level documents (sheets), and for each sheet the number of rows and columns with inferred types.

ยงExamples

use sheeter_engine::{inspect, Format};

let report = inspect(b"name,age\nAlice,30\nBob,25\n", Format::Csv).unwrap();
assert!(report.contains("rows: 2"));
assert!(report.contains("name"));