pub struct OutOfLineBuffers { /* private fields */ }
Expand description
A tool to reserve space for buffers that are not in-line with the data
In most cases, buffers are stored in the page and referred to in the encoding metadata by their index in the page. This keeps all buffers within a page together. As a result, most encoders should not need to use this structure.
In some cases (currently only the large binary encoding) there is a need to access buffers that are not in the page (because storing the position / offset of every page in the page metadata would be too expensive).
To do this you can add a buffer with add_buffer
and then use the returned position
in some way (in the large binary encoding the returned position is stored in the page
data as a position / size array).
Implementations§
Source§impl OutOfLineBuffers
impl OutOfLineBuffers
pub fn new(base_position: u64, buffer_alignment: u64) -> Self
pub fn add_buffer(&mut self, buffer: LanceBuffer) -> u64
pub fn take_buffers(self) -> Vec<LanceBuffer>
pub fn reset_position(&mut self, position: u64)
Auto Trait Implementations§
impl Freeze for OutOfLineBuffers
impl RefUnwindSafe for OutOfLineBuffers
impl Send for OutOfLineBuffers
impl Sync for OutOfLineBuffers
impl Unpin for OutOfLineBuffers
impl UnwindSafe for OutOfLineBuffers
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