[−][src]Trait rio_api::parser::QuadsParser
A parser returning Quad
.
Associated Types
Loading content...Required methods
fn parse_step<E: From<Self::Error>>(
&mut self,
on_quad: &mut impl FnMut(Quad) -> Result<(), E>
) -> Result<(), E>
&mut self,
on_quad: &mut impl FnMut(Quad) -> Result<(), E>
) -> Result<(), E>
Parses a small chunk of the file and calls on_quad
each time a new quad is read.
(A "small chunk" could be a line for an N-Quads parser.)
This method should be called as long as is_end
returns false.
May fail on errors caused by the parser itself or by the callback function on_quad
.
fn is_end(&self) -> bool
Returns true
if the file has been completely consumed by the parser.
Provided methods
fn parse_all<E: From<Self::Error>>(
&mut self,
on_quad: &mut impl FnMut(Quad) -> Result<(), E>
) -> Result<(), E>
&mut self,
on_quad: &mut impl FnMut(Quad) -> Result<(), E>
) -> Result<(), E>
Parses the complete file and calls on_quad
each time a new quad is read.
May fail on errors caused by the parser itself or by the callback function on_quad
.
fn into_iter<T, E: From<Self::Error>, F: FnMut(Quad) -> Result<T, E>>(
self,
convert_quad: F
) -> QuadsParserIterator<T, E, F, Self>
self,
convert_quad: F
) -> QuadsParserIterator<T, E, F, Self>
Converts the parser into a Result<T, E>
iterator.
convert_triple
is a function converting Rio Triple
to T
.