pub struct RepDefSlicer<'a> { /* private fields */ }
Expand description
Slices a level buffer into pieces
This is needed to handle the fact that a level buffer may have more levels than values due to special (empty/null) lists.
As a result, a call to slice_next(10)
may return 10 levels or it may
return more than 10 levels if any special values are encountered.
Implementations§
Source§impl<'a> RepDefSlicer<'a>
impl<'a> RepDefSlicer<'a>
pub fn num_levels(&self) -> usize
pub fn num_levels_remaining(&self) -> usize
pub fn all_levels(&self) -> &LanceBuffer
Sourcepub fn slice_rest(&mut self) -> LanceBuffer
pub fn slice_rest(&mut self) -> LanceBuffer
Returns the rest of the levels not yet sliced
This must be called instead of slice_next
on the final iteration.
This is because anytime we slice there may be empty/null lists on the
boundary that are “free” and the current behavior in slice_next
is to
leave them for the next call.
slice_rest
will slice all remaining levels and return them.
Sourcepub fn slice_next(&mut self, num_values: usize) -> LanceBuffer
pub fn slice_next(&mut self, num_values: usize) -> LanceBuffer
Returns enough levels to satisfy the next num_values
values
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RepDefSlicer<'a>
impl<'a> RefUnwindSafe for RepDefSlicer<'a>
impl<'a> Send for RepDefSlicer<'a>
impl<'a> Sync for RepDefSlicer<'a>
impl<'a> Unpin for RepDefSlicer<'a>
impl<'a> UnwindSafe for RepDefSlicer<'a>
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