Struct GeneralizedNQuadsParser

Source
pub struct GeneralizedNQuadsParser<R: BufRead> { /* private fields */ }
Expand description

A N-Quads streaming parser parsing generalized quads.

It implements the GeneralizedQuadsParser trait. Using it requires to enable the generalized feature.

Implementations§

Source§

impl<R: BufRead> GeneralizedNQuadsParser<R>

Source

pub fn new(reader: R) -> Self

Trait Implementations§

Source§

impl<R: BufRead> GeneralizedQuadsParser for GeneralizedNQuadsParser<R>

Source§

type Error = TurtleError

Source§

fn parse_step<E: From<TurtleError>>( &mut self, on_quad: &mut impl FnMut(GeneralizedQuad<'_>) -> 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.) Read more
Source§

fn is_end(&self) -> bool

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

fn parse_all<E>( &mut self, on_quad: &mut impl FnMut(GeneralizedQuad<'_>) -> Result<(), E>, ) -> Result<(), E>
where E: From<Self::Error>,

Parses the complete file and calls on_quad each time a new quad is read. Read more
Source§

fn into_iter<T, E, F>( self, convert_quad: F, ) -> GeneralizedQuadsParserIterator<T, E, F, Self>
where E: From<Self::Error>, F: FnMut(GeneralizedQuad<'_>) -> Result<T, E>, Self: Sized,

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

Auto Trait Implementations§

§

impl<R> Freeze for GeneralizedNQuadsParser<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for GeneralizedNQuadsParser<R>
where R: RefUnwindSafe,

§

impl<R> Send for GeneralizedNQuadsParser<R>
where R: Send,

§

impl<R> Sync for GeneralizedNQuadsParser<R>
where R: Sync,

§

impl<R> Unpin for GeneralizedNQuadsParser<R>
where R: Unpin,

§

impl<R> UnwindSafe for GeneralizedNQuadsParser<R>
where R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.