pub struct NippyJarCursor<'a, H = ()> { /* private fields */ }
Expand description
Simple cursor implementation to retrieve data from NippyJar
.
Implementations§
Source§impl<'a, H: NippyJarHeader> NippyJarCursor<'a, H>
impl<'a, H: NippyJarHeader> NippyJarCursor<'a, H>
Sourcepub fn new(jar: &'a NippyJar<H>) -> Result<Self, NippyJarError>
pub fn new(jar: &'a NippyJar<H>) -> Result<Self, NippyJarError>
Creates a new instance of NippyJarCursor
for the given NippyJar
.
Sourcepub fn with_reader(
jar: &'a NippyJar<H>,
reader: Arc<DataReader>,
) -> Result<Self, NippyJarError>
pub fn with_reader( jar: &'a NippyJar<H>, reader: Arc<DataReader>, ) -> Result<Self, NippyJarError>
Creates a new instance of NippyJarCursor
with the specified NippyJar
and data
reader.
Sourcepub fn row_by_number(
&mut self,
row: usize,
) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
pub fn row_by_number( &mut self, row: usize, ) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
Returns a row by its number.
Sourcepub fn next_row(&mut self) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
pub fn next_row(&mut self) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
Returns the current value and advances the row.
Sourcepub fn row_by_number_with_cols(
&mut self,
row: usize,
mask: usize,
) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
pub fn row_by_number_with_cols( &mut self, row: usize, mask: usize, ) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
Returns a row by its number by using a mask
to only read certain columns from the row.
Sourcepub fn next_row_with_cols(
&mut self,
mask: usize,
) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
pub fn next_row_with_cols( &mut self, mask: usize, ) -> Result<Option<Vec<&'_ [u8]>>, NippyJarError>
Returns the current value and advances the row.
Uses a mask
to only read certain columns from the row.
Trait Implementations§
Source§impl<'a, H: Clone> Clone for NippyJarCursor<'a, H>
impl<'a, H: Clone> Clone for NippyJarCursor<'a, H>
Source§fn clone(&self) -> NippyJarCursor<'a, H>
fn clone(&self) -> NippyJarCursor<'a, H>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, H> Freeze for NippyJarCursor<'a, H>
impl<'a, H> RefUnwindSafe for NippyJarCursor<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for NippyJarCursor<'a, H>where
H: Sync,
impl<'a, H> Sync for NippyJarCursor<'a, H>where
H: Sync,
impl<'a, H> Unpin for NippyJarCursor<'a, H>
impl<'a, H> UnwindSafe for NippyJarCursor<'a, H>where
H: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes