pub trait StructArrayExt: StructArraySlotsExt {
// Provided methods
fn nullability(&self) -> Nullability { ... }
fn names(&self) -> &FieldNames { ... }
fn struct_validity(&self) -> Validity { ... }
fn iter_unmasked_fields(
&self,
) -> impl ExactSizeIterator<Item = &ArrayRef> + '_ { ... }
fn unmasked_field_opt(&self, idx: usize) -> Option<&ArrayRef> { ... }
fn unmasked_field(&self, idx: usize) -> &ArrayRef { ... }
fn unmasked_field_by_name_opt(
&self,
name: impl AsRef<str>,
) -> Option<&ArrayRef> { ... }
fn unmasked_field_by_name(
&self,
name: impl AsRef<str>,
) -> VortexResult<&ArrayRef> { ... }
fn struct_fields(&self) -> &StructFields { ... }
}Expand description
Struct-specific accessors.
Slot accessors (validity, fields, slots_view) live on the generated
StructArraySlotsExt supertrait; this trait layers struct-specific lookups on top.
Provided Methods§
fn nullability(&self) -> Nullability
fn names(&self) -> &FieldNames
fn struct_validity(&self) -> Validity
Sourcefn iter_unmasked_fields(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_
fn iter_unmasked_fields(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_
Iterate over the field arrays in declaration order.
Sourcefn unmasked_field_opt(&self, idx: usize) -> Option<&ArrayRef>
fn unmasked_field_opt(&self, idx: usize) -> Option<&ArrayRef>
The field array at idx, or None if idx is out of bounds.
Use this over unmasked_field when the index comes from outside
the library and an out-of-bounds value is an error to report rather than a bug to panic on.
Sourcefn unmasked_field(&self, idx: usize) -> &ArrayRef
fn unmasked_field(&self, idx: usize) -> &ArrayRef
fn unmasked_field_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef>
fn unmasked_field_by_name( &self, name: impl AsRef<str>, ) -> VortexResult<&ArrayRef>
fn struct_fields(&self) -> &StructFields
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".