pub trait UnionArrayExt: TypedArrayRef<Union> {
// Provided methods
fn variants(&self) -> &UnionVariants { ... }
fn type_ids(&self) -> &ArrayRef { ... }
fn iter_children(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_ { ... }
fn children(&self) -> Arc<[ArrayRef]> ⓘ { ... }
fn child(&self, index: usize) -> Option<&ArrayRef> { ... }
fn child_by_type_id(&self, type_id: u8) -> Option<&ArrayRef> { ... }
fn child_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef> { ... }
fn child_by_name(&self, name: impl AsRef<str>) -> VortexResult<&ArrayRef> { ... }
}Expand description
Accessors for a canonical sparse union array.
Provided Methods§
Sourcefn variants(&self) -> &UnionVariants
fn variants(&self) -> &UnionVariants
The union’s variant schema.
Sourcefn type_ids(&self) -> &ArrayRef
fn type_ids(&self) -> &ArrayRef
The row-aligned u8 type IDs whose nulls represent outer union nulls.
Sourcefn iter_children(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_
fn iter_children(&self) -> impl ExactSizeIterator<Item = &ArrayRef> + '_
Iterate over sparse children in variant order.
Sourcefn child_by_type_id(&self, type_id: u8) -> Option<&ArrayRef>
fn child_by_type_id(&self, type_id: u8) -> Option<&ArrayRef>
Return a sparse child selected by a data-level type ID.
Sourcefn child_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef>
fn child_by_name_opt(&self, name: impl AsRef<str>) -> Option<&ArrayRef>
Return a sparse child selected by its variant name, if present.
Sourcefn child_by_name(&self, name: impl AsRef<str>) -> VortexResult<&ArrayRef>
fn child_by_name(&self, name: impl AsRef<str>) -> VortexResult<&ArrayRef>
Return a sparse child selected by its variant name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".