pub struct ArrayMetadata {
pub pointer: String,
pub length: usize,
pub column_names: Vec<String>,
pub is_uniform: bool,
}Expand description
Extract table metadata for fast array operations during schema parsing
Fields§
§pointer: StringPointer to the array location
length: usizeArray length (cached for fast bounds checking)
column_names: Vec<String>Column names for object arrays (cached for fast field access)
is_uniform: boolWhether this is a uniform object array (all elements have same structure)
Implementations§
Source§impl ArrayMetadata
impl ArrayMetadata
Sourcepub fn build(data: &Value, pointer: &str) -> Option<Self>
pub fn build(data: &Value, pointer: &str) -> Option<Self>
Build metadata for an array at the given pointer
Sourcepub fn get_column_value<'a>(
&self,
data: &'a Value,
row_index: usize,
column: &str,
) -> Option<&'a Value>
pub fn get_column_value<'a>( &self, data: &'a Value, row_index: usize, column: &str, ) -> Option<&'a Value>
Fast column access for uniform object arrays
Sourcepub fn is_valid_index(&self, index: usize) -> bool
pub fn is_valid_index(&self, index: usize) -> bool
Fast bounds checking
Trait Implementations§
Source§impl Clone for ArrayMetadata
impl Clone for ArrayMetadata
Source§fn clone(&self) -> ArrayMetadata
fn clone(&self) -> ArrayMetadata
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 ArrayMetadata
impl RefUnwindSafe for ArrayMetadata
impl Send for ArrayMetadata
impl Sync for ArrayMetadata
impl Unpin for ArrayMetadata
impl UnwindSafe for ArrayMetadata
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