pub struct SchemaLayout { /* private fields */ }Expand description
Pre-computed layout for binary encoding/decoding
Implementations§
Source§impl SchemaLayout
impl SchemaLayout
Sourcepub fn new(
columns: Vec<ColumnLayout>,
row_stride: usize,
null_mask_size: usize,
) -> Self
pub fn new( columns: Vec<ColumnLayout>, row_stride: usize, null_mask_size: usize, ) -> Self
Create a SchemaLayout directly from components
Sourcepub fn from_schema(schema: &Table) -> Self
pub fn from_schema(schema: &Table) -> Self
Create a SchemaLayout from a table schema
Sourcepub fn from_schemas(schemas: &[&Table]) -> Self
pub fn from_schemas(schemas: &[&Table]) -> Self
Create a SchemaLayout by merging multiple table schemas (for JOIN results). Columns are concatenated in order: left table columns, then right table columns, etc. Right-side columns are marked nullable since LEFT JOIN can produce NULLs.
Sourcepub fn from_projection(schema: &Table, column_names: &[String]) -> Self
pub fn from_projection(schema: &Table, column_names: &[String]) -> Self
Create a SchemaLayout from projected columns
Sourcepub fn columns(&self) -> &[ColumnLayout]
pub fn columns(&self) -> &[ColumnLayout]
Get the columns
Sourcepub fn row_stride(&self) -> usize
pub fn row_stride(&self) -> usize
Get row stride (total bytes per row)
Sourcepub fn null_mask_size(&self) -> usize
pub fn null_mask_size(&self) -> usize
Get null mask size in bytes
Sourcepub fn calculate_fixed_size(&self, row_count: usize) -> usize
pub fn calculate_fixed_size(&self, row_count: usize) -> usize
Calculate required buffer size for N rows (header + fixed section only)
Trait Implementations§
Source§impl Clone for SchemaLayout
impl Clone for SchemaLayout
Source§fn clone(&self) -> SchemaLayout
fn clone(&self) -> SchemaLayout
Returns a duplicate 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 Freeze for SchemaLayout
impl RefUnwindSafe for SchemaLayout
impl Send for SchemaLayout
impl Sync for SchemaLayout
impl Unpin for SchemaLayout
impl UnwindSafe for SchemaLayout
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