pub struct StreamingParser<R: BufRead> { /* private fields */ }Expand description
Streaming parser that yields batches of triples
Implementations§
Source§impl<R: Read> StreamingParser<BufReader<R>>
impl<R: Read> StreamingParser<BufReader<R>>
Sourcepub fn with_config(reader: R, config: StreamingConfig) -> Self
pub fn with_config(reader: R, config: StreamingConfig) -> Self
Create a streaming parser with custom configuration
Source§impl<R: BufRead> StreamingParser<R>
impl<R: BufRead> StreamingParser<R>
Sourcepub fn from_buf_reader(reader: R, config: StreamingConfig) -> Self
pub fn from_buf_reader(reader: R, config: StreamingConfig) -> Self
Create from an existing BufRead
Sourcepub fn triples_parsed(&self) -> usize
pub fn triples_parsed(&self) -> usize
Get the number of triples parsed so far
Sourcepub fn bytes_read(&self) -> usize
pub fn bytes_read(&self) -> usize
Get the number of bytes read so far
Sourcepub fn next_batch(&mut self) -> TurtleResult<Option<Vec<Triple>>>
pub fn next_batch(&mut self) -> TurtleResult<Option<Vec<Triple>>>
Parse the next batch of triples
Sourcepub fn batches(self) -> StreamingBatchIterator<R> ⓘ
pub fn batches(self) -> StreamingBatchIterator<R> ⓘ
Get an iterator over batches
Sourcepub fn triples(self) -> StreamingTripleIterator<R> ⓘ
pub fn triples(self) -> StreamingTripleIterator<R> ⓘ
Get an iterator over individual triples
Auto Trait Implementations§
impl<R> Freeze for StreamingParser<R>where
R: Freeze,
impl<R> RefUnwindSafe for StreamingParser<R>where
R: RefUnwindSafe,
impl<R> Send for StreamingParser<R>where
R: Send,
impl<R> Sync for StreamingParser<R>where
R: Sync,
impl<R> Unpin for StreamingParser<R>where
R: Unpin,
impl<R> UnwindSafe for StreamingParser<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more