Skip to main content

parse_quads

Function parse_quads 

Source
pub fn parse_quads<R: BufRead, F: FnMut(Quad) -> Result<()>>(
    reader: R,
    format: InputFormat,
    on_quad: F,
) -> Result<ParseOutcome>
Expand description

Stream-parse reader according to format and emit one [Quad] per statement. For triple-shaped formats, the graph component is set to [GraphName::DefaultGraph]; for quad-shaped formats, the input’s named graph is preserved. Blank nodes are NOT skipped — the caller is expected to handle them via canonicalisation. Counts of statements and of those that touch a blank node are returned in the outcome.