pub struct EnrichedDocumentsBatchReader<R> { /* private fields */ }
Expand description
The EnrichedDocumentsBatchReader
provides a way to iterate over documents that have
been created with a DocumentsBatchWriter
and, for the enriched data,
a simple grenad::Reader<File>
.
The documents are returned in the form of obkv::Reader
where each field is identified with a
FieldId
. The mapping between the field ids and the field names is done thanks to the index.
Implementations§
Source§impl<R: Read + Seek> EnrichedDocumentsBatchReader<R>
impl<R: Read + Seek> EnrichedDocumentsBatchReader<R>
pub fn new( documents: DocumentsBatchReader<R>, primary_key: String, external_ids: Reader<BufReader<File>>, ) -> Result<Self, Error>
pub fn documents_count(&self) -> u32
pub fn primary_key(&self) -> &str
pub fn is_empty(&self) -> bool
pub fn documents_batch_index(&self) -> &DocumentsBatchIndex
Sourcepub fn into_cursor_and_fields_index(
self,
) -> (EnrichedDocumentsBatchCursor<R>, DocumentsBatchIndex)
pub fn into_cursor_and_fields_index( self, ) -> (EnrichedDocumentsBatchCursor<R>, DocumentsBatchIndex)
This method returns a forward cursor over the enriched documents.
Auto Trait Implementations§
impl<R> Freeze for EnrichedDocumentsBatchReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for EnrichedDocumentsBatchReader<R>where
R: RefUnwindSafe,
impl<R> Send for EnrichedDocumentsBatchReader<R>where
R: Send,
impl<R> Sync for EnrichedDocumentsBatchReader<R>where
R: Sync,
impl<R> Unpin for EnrichedDocumentsBatchReader<R>where
R: Unpin,
impl<R> UnwindSafe for EnrichedDocumentsBatchReader<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