Struct narrow::array::StructArray

source ·
pub struct StructArray<T: StructArrayType, const NULLABLE: bool = false, Buffer: BufferType = VecBuffer>(pub <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>)
where
    <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>;
Expand description

Array for product types.

Tuple Fields§

§0: <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>

Implementations§

source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, for<'a> &'a Self: IntoIterator,

source

pub fn iter(&self) -> <&Self as IntoIterator>::IntoIter

Returns an iterator over the items in this StructArray.

Trait Implementations§

source§

impl<T, const NULLABLE: bool, Buffer: BufferType> Array for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, T: Nullability<NULLABLE> + StructArrayType,

§

type Item = <T as Nullability<NULLABLE>>::Item

The items stored in this array.
source§

impl<T, const NULLABLE: bool, Buffer: BufferType> Array for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE> + StructArrayTypeFields, T: Nullability<NULLABLE> + StructArrayType,

Available on crate feature arrow-rs only.
§

type Array = StructArray

The corresponding arrow array
source§

fn as_field(name: &str) -> Field

Returns the field of this array.
source§

impl<T: StructArrayType, Buffer: BufferType> BitmapRef for StructArray<T, true, Buffer>

§

type Buffer = Buffer

The buffer type of the bitmap.
source§

fn bitmap_ref(&self) -> &Bitmap<Self::Buffer>

Returns a reference to an immutable Bitmap.
source§

impl<T: StructArrayType, Buffer: BufferType> BitmapRefMut for StructArray<T, true, Buffer>

source§

fn bitmap_ref_mut(&mut self) -> &mut Bitmap<Self::Buffer>

Returns a mutable reference to a Bitmap.
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> Default for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Default,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: StructArrayType, U, Buffer: BufferType> Extend<Option<U>> for StructArray<T, true, Buffer>
where Nullable<<T as StructArrayType>::Array<Buffer>, Buffer>: Extend<Option<U>>,

source§

fn extend<I: IntoIterator<Item = Option<U>>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T: StructArrayType, U, Buffer: BufferType> Extend<U> for StructArray<T, false, Buffer>
where <T as StructArrayType>::Array<Buffer>: Extend<U>,

source§

fn extend<I: IntoIterator<Item = U>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> From<Arc<dyn Array>> for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, Self: From<StructArray>,

Available on crate feature arrow-rs only.
source§

fn from(value: Arc<dyn Array>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> From<RecordBatch> for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, Self: From<StructArray>,

Available on crate feature arrow-rs only.
source§

fn from(value: RecordBatch) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> From<StructArray<T, NULLABLE, Buffer>> for Arc<dyn Array>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, StructArray: From<StructArray<T, NULLABLE, Buffer>>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray<T, NULLABLE, Buffer>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> From<StructArray<T, NULLABLE, Buffer>> for RecordBatch
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, StructArray: From<StructArray<T, NULLABLE, Buffer>>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray<T, NULLABLE, Buffer>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, Buffer: BufferType> From<StructArray<T, false, Buffer>> for StructArray
where <T as StructArrayType>::Array<Buffer>: StructArrayTypeFields + Into<Vec<Arc<dyn Array>>>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray<T, false, Buffer>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, Buffer: BufferType> From<StructArray<T, false, Buffer>> for StructArray<T, true, Buffer>
where <T as StructArrayType>::Array<Buffer>: Length, Bitmap<Buffer>: FromIterator<bool>,

source§

fn from(value: StructArray<T, false, Buffer>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, Buffer: BufferType> From<StructArray<T, true, Buffer>> for StructArray
where <T as StructArrayType>::Array<Buffer>: StructArrayTypeFields + Into<Vec<Arc<dyn Array>>>, Bitmap<Buffer>: Into<NullBuffer>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray<T, true, Buffer>) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, Buffer: BufferType> From<StructArray> for StructArray<T, false, Buffer>
where <T as StructArrayType>::Array<Buffer>: From<Vec<Arc<dyn Array>>>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, Buffer: BufferType> From<StructArray> for StructArray<T, true, Buffer>
where <T as StructArrayType>::Array<Buffer>: From<Vec<Arc<dyn Array>>>, Bitmap<Buffer>: From<NullBuffer>,

Available on crate feature arrow-rs only.
source§

fn from(value: StructArray) -> Self

Converts to this type from the input type.
source§

impl<T: StructArrayType, U, const NULLABLE: bool, Buffer: BufferType> FromIterator<U> for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: FromIterator<U>,

source§

fn from_iter<I: IntoIterator<Item = U>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<'a, T, const NULLABLE: bool, Buffer: BufferType> IntoIterator for &'a StructArray<T, NULLABLE, Buffer>
where T: Nullability<NULLABLE> + StructArrayType, <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, &'a <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

§

type Item = <&'a <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::Item

The type of the elements being iterated over.
§

type IntoIter = <&'a <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, const NULLABLE: bool, Buffer: BufferType> IntoIterator for StructArray<T, NULLABLE, Buffer>
where T: Nullability<NULLABLE> + StructArrayType, <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

§

type Item = <<<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::Item

The type of the elements being iterated over.
§

type IntoIter = <<<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T: StructArrayType, const NULLABLE: bool, Buffer: BufferType> Length for StructArray<T, NULLABLE, Buffer>
where <T as StructArrayType>::Array<Buffer>: Validity<NULLABLE>, <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Length,

source§

fn len(&self) -> usize

Returns the number of elements in the collection, also referred to as its length.
source§

fn is_empty(&self) -> bool

Returns true if there are no elements in the collection.
source§

impl<T: StructArrayType, Buffer: BufferType> ValidityBitmap for StructArray<T, true, Buffer>

source§

fn is_null(&self, index: usize) -> Option<bool>

Returns true if the element at position index is null.
source§

unsafe fn is_null_unchecked(&self, index: usize) -> bool

Returns true if the element at position index is null, without performing any bounds checking. Read more
source§

fn null_count(&self) -> usize

Returns the number of null elements.
source§

fn is_valid(&self, index: usize) -> Option<bool>

Returns true if the element at position index is valid.
source§

unsafe fn is_valid_unchecked(&self, index: usize) -> bool

Returns true if the element at position index is valid, without performing any bounds checking. Read more
source§

fn valid_count(&self) -> usize

Returns the number of valid elements.
source§

fn any_null(&self) -> bool

Returns true if the array contains at least one null element.
source§

fn all_null(&self) -> bool

Returns true if all the elements are null.
source§

fn any_valid(&self) -> bool

Returns true if the array contains at least one valid element.
source§

fn all_valid(&self) -> bool

Returns true if all the elements are valid.

Auto Trait Implementations§

§

impl<T, const NULLABLE: bool, Buffer> Freeze for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Freeze,

§

impl<T, const NULLABLE: bool, Buffer> RefUnwindSafe for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: RefUnwindSafe,

§

impl<T, const NULLABLE: bool, Buffer> Send for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Send,

§

impl<T, const NULLABLE: bool, Buffer> Sync for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Sync,

§

impl<T, const NULLABLE: bool, Buffer> Unpin for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Unpin,

§

impl<T, const NULLABLE: bool, Buffer> UnwindSafe for StructArray<T, NULLABLE, Buffer>
where <<T as StructArrayType>::Array<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,