pub struct MutableEventRow<'a> { /* private fields */ }Expand description
Arena-allocated, mutable writer for constructing an EventRow.
The backing buffer is allocated from a [bumpalo::Bump] arena, ensuring
zero heap allocations on the hot path.
Implementations§
Source§impl<'a> MutableEventRow<'a>
impl<'a> MutableEventRow<'a>
Sourcepub fn new_in(
arena: &'a Bump,
schema: &'a RowSchema,
var_capacity: usize,
) -> Self
pub fn new_in( arena: &'a Bump, schema: &'a RowSchema, var_capacity: usize, ) -> Self
Allocates a new row from the given arena.
var_capacity is the number of extra bytes reserved for variable-length data
(strings, binary). The total allocation is schema.min_row_size() + var_capacity.
Sourcepub fn set_null(&mut self, field_idx: usize, is_null: bool)
pub fn set_null(&mut self, field_idx: usize, is_null: bool)
Sets or clears the null flag for a field.
When is_null is true, the field is marked as null in the bitmap.
Sourcepub fn set_i64(&mut self, field_idx: usize, value: i64)
pub fn set_i64(&mut self, field_idx: usize, value: i64)
Writes an i64 field. Also accepts FieldType::TimestampMicros.
Sourcepub fn set_str(&mut self, field_idx: usize, value: &str)
pub fn set_str(&mut self, field_idx: usize, value: &str)
Writes a variable-length UTF-8 string field.
Appends the string bytes to the variable region and writes the
(offset, length) descriptor pair in the field’s inline slot.
§Panics
Panics if the variable region overflows the allocated capacity.
Sourcepub fn set_bytes(&mut self, field_idx: usize, value: &[u8])
pub fn set_bytes(&mut self, field_idx: usize, value: &[u8])
Writes a variable-length binary field.
Appends the bytes to the variable region and writes the
(offset, length) descriptor pair in the field’s inline slot.
§Panics
Panics if the variable region overflows the allocated capacity.
Sourcepub fn as_event_row(&self) -> EventRow<'_>
pub fn as_event_row(&self) -> EventRow<'_>
Borrows the current row state as a read-only EventRow.
The returned row’s lifetime is tied to the borrow of self.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MutableEventRow<'a>
impl<'a> RefUnwindSafe for MutableEventRow<'a>
impl<'a> Send for MutableEventRow<'a>
impl<'a> Sync for MutableEventRow<'a>
impl<'a> Unpin for MutableEventRow<'a>
impl<'a> UnsafeUnpin for MutableEventRow<'a>
impl<'a> !UnwindSafe for MutableEventRow<'a>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§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>
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