pub struct SchemaHeader {
pub flags: u8,
pub root_key: Option<String>,
pub row_count: usize,
pub fields: Vec<FieldDef>,
pub null_bitmap: Option<Vec<u8>>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
Schema header containing metadata about the encoded data
The header is self-describing and stores:
- Flags indicating optional features (nulls, root key, etc.)
- Optional root key for single-array JSON structures
- Row and field counts
- Field definitions (names and types)
- Optional null bitmap for tracking null values
§Binary Format
[flags: u8]
[root_key?: varint_string] // if FLAG_HAS_ROOT_KEY
[row_count: varint]
[field_count: varint]
[field_types: 4-bit packed]
[field_names: varint_strings]
[null_bitmap?: bytes] // if FLAG_HAS_NULLSFields§
§flags: u8§root_key: Option<String>§row_count: usize§fields: Vec<FieldDef>§null_bitmap: Option<Vec<u8>>§metadata: Option<HashMap<String, String>>Implementations§
Source§impl SchemaHeader
impl SchemaHeader
Sourcepub fn total_value_count(&self) -> usize
pub fn total_value_count(&self) -> usize
Calculate total value count (row_count * field_count)
Trait Implementations§
Source§impl Clone for SchemaHeader
impl Clone for SchemaHeader
Source§fn clone(&self) -> SchemaHeader
fn clone(&self) -> SchemaHeader
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 moreSource§impl Debug for SchemaHeader
impl Debug for SchemaHeader
Source§impl PartialEq for SchemaHeader
impl PartialEq for SchemaHeader
impl StructuralPartialEq for SchemaHeader
Auto Trait Implementations§
impl Freeze for SchemaHeader
impl RefUnwindSafe for SchemaHeader
impl Send for SchemaHeader
impl Sync for SchemaHeader
impl Unpin for SchemaHeader
impl UnwindSafe for SchemaHeader
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