pub struct DocumentsBatchCursor<R> { /* private fields */ }
Expand description
A forward cursor over the documents in a DocumentsBatchReader
.
Implementations§
Source§impl<R> DocumentsBatchCursor<R>
impl<R> DocumentsBatchCursor<R>
Source§impl<R: Read + Seek> DocumentsBatchCursor<R>
impl<R: Read + Seek> DocumentsBatchCursor<R>
Sourcepub fn get(
&mut self,
offset: u32,
) -> Result<Option<&KvReader<FieldId>>, DocumentsBatchCursorError>
pub fn get( &mut self, offset: u32, ) -> Result<Option<&KvReader<FieldId>>, DocumentsBatchCursorError>
Returns a single document from the database.
Sourcepub fn next_document(
&mut self,
) -> Result<Option<&KvReader<FieldId>>, DocumentsBatchCursorError>
pub fn next_document( &mut self, ) -> Result<Option<&KvReader<FieldId>>, DocumentsBatchCursorError>
Returns the next document, starting from the first one. Subsequent calls to
next_document
advance the document reader until all the documents have been read.
Auto Trait Implementations§
impl<R> Freeze for DocumentsBatchCursor<R>where
R: Freeze,
impl<R> RefUnwindSafe for DocumentsBatchCursor<R>where
R: RefUnwindSafe,
impl<R> Send for DocumentsBatchCursor<R>where
R: Send,
impl<R> Sync for DocumentsBatchCursor<R>where
R: Sync,
impl<R> Unpin for DocumentsBatchCursor<R>where
R: Unpin,
impl<R> UnwindSafe for DocumentsBatchCursor<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