pub struct ListRecordWriter<'b> { /* private fields */ }Expand description
Phase 10-c: in-flight List<Schema> element writer.
Buffered between BufferBuilder::list_record_writer and
BufferBuilder::finish_list_record. Each start_entry allocates
a detached child builder; finish_entry rebases the child’s
internal pointers, appends the bytes to the parent’s tail area,
and records the per-entry offset. The list header is written
only when the writer is finished, so the entry pointer array can
be filled with the final per-entry offsets without back-patches.
Implementations§
Source§impl<'b> ListRecordWriter<'b>
impl<'b> ListRecordWriter<'b>
Sourcepub fn start_entry(&self) -> BufferBuilder<'b>
pub fn start_entry(&self) -> BufferBuilder<'b>
Allocate a fresh entry builder. The caller drives it with
write_int / write_string / nested sub_record and hands
it back via Self::finish_entry.
Sourcepub fn finish_entry(
&mut self,
parent: &mut BufferBuilder<'_>,
child: BufferBuilder<'_>,
) -> Result<(), BufferError>
pub fn finish_entry( &mut self, parent: &mut BufferBuilder<'_>, child: BufferBuilder<'_>, ) -> Result<(), BufferError>
Commit a previously-started entry into the parent buffer.
Pads the parent tail area up to the schema’s root_align,
rebases the child’s pointer-indirect slots through
relocate_pointers, appends the bytes, and records the
entry’s offset for the eventual list header.
Auto Trait Implementations§
impl<'b> Freeze for ListRecordWriter<'b>
impl<'b> RefUnwindSafe for ListRecordWriter<'b>
impl<'b> Send for ListRecordWriter<'b>
impl<'b> Sync for ListRecordWriter<'b>
impl<'b> Unpin for ListRecordWriter<'b>
impl<'b> UnsafeUnpin for ListRecordWriter<'b>
impl<'b> UnwindSafe for ListRecordWriter<'b>
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
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>
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>
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