pub trait QuadsParser: Sized {
    type Error: Error;
    fn parse_step<E: From<Self::Error>>(
        &mut self,
        on_quad: &mut impl FnMut(Quad<'_>) -> Result<(), E>
    ) -> Result<(), E>;
fn is_end(&self) -> bool; fn parse_all<E: From<Self::Error>>(
        &mut self,
        on_quad: &mut impl FnMut(Quad<'_>) -> Result<(), E>
    ) -> Result<(), E> { ... }
fn into_iter<T, E: From<Self::Error>, F: FnMut(Quad<'_>) -> Result<T, E>>(
        self,
        convert_quad: F
    ) -> QuadsParserIterator<T, E, F, Self>
Notable traits for QuadsParserIterator<T, E, F, P>
impl<T, E: From<P::Error>, F: FnMut(Quad<'_>) -> Result<T, E>, P: QuadsParser> Iterator for QuadsParserIterator<T, E, F, P> type Item = Result<T, E>;
{ ... } }
Expand description

A parser returning Quad.

Associated Types

Required methods

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 fails on errors caused by the parser itself or by the callback function on_quad.

Returns true if the file has been completely consumed by the parser.

Provided methods

Parses the complete file and calls on_quad each time a new quad is read.

May fails on errors caused by the parser itself or by the callback function on_quad.

Converts the parser into a Result<T, E> iterator.

convert_triple is a function converting Rio Triple to T.

Implementors