Skip to main content

StructArrayExt

Trait StructArrayExt 

Source
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§

Source

fn nullability(&self) -> Nullability

Source

fn names(&self) -> &FieldNames

Source

fn struct_validity(&self) -> Validity

Source

fn iter_unmasked_fields(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_

Iterate over the field arrays in declaration order.

Source

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.

Source

fn unmasked_field(&self, idx: usize) -> &ArrayRef

The field array at idx.

§Panics

If idx is out of bounds.

Source

fn unmasked_field_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef>

Source

fn unmasked_field_by_name( &self, name: impl AsRef<str>, ) -> VortexResult<&ArrayRef>

Source

fn struct_fields(&self) -> &StructFields

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§