Struct narrow::array::FixedSizePrimitiveArray

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

Array with primitive values.

Tuple Fields§

§0: <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>

Implementations§

source§

impl<T: FixedSize, const NULLABLE: bool, Buffer: BufferType> FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, for<'a> &'a <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

source

pub fn iter( &self, ) -> <&<<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter

Returns an iterator over the items in this FixedSizePrimitiveArray.

Trait Implementations§

source§

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

source§

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

The items stored in this array.
source§

impl<const NULLABLE: bool, T, Buffer: BufferType> Array for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, T: Nullability<NULLABLE> + FixedSize + FixedSizeExt,

Available on crate feature arrow-rs only.
source§

type Array = PrimitiveArray<<T as FixedSizeExt>::ArrowPrimitiveType>

The corresponding arrow array
source§

fn as_field(name: &str) -> Field

Returns the field of this array.
source§

impl<T: FixedSize, Buffer: BufferType> AsRef<[T]> for FixedSizePrimitiveArray<T, false, Buffer>

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T: FixedSize, Buffer: BufferType> BitmapRef for FixedSizePrimitiveArray<T, true, Buffer>

source§

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: FixedSize, Buffer: BufferType> BitmapRefMut for FixedSizePrimitiveArray<T, true, Buffer>

source§

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

Returns a mutable reference to a Bitmap.
source§

impl<T: FixedSize, const NULLABLE: bool, Buffer: BufferType> Clone for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Clone,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: FixedSize, const NULLABLE: bool, Buffer: BufferType> Debug for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: FixedSize, const NULLABLE: bool, Buffer: BufferType> Default for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Default,

source§

fn default() -> Self

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

impl<T: FixedSize, U, const NULLABLE: bool, Buffer: BufferType> Extend<U> for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<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<const NULLABLE: bool, T: FixedSizeExt, Buffer: BufferType> From<Arc<dyn Array>> for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, Self: From<PrimitiveArray<<T as FixedSizeExt>::ArrowPrimitiveType>>,

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: FixedSizeExt, const NULLABLE: bool, Buffer: BufferType> From<FixedSizePrimitiveArray<T, NULLABLE, Buffer>> for Arc<dyn Array>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, PrimitiveArray<<T as FixedSizeExt>::ArrowPrimitiveType>: From<FixedSizePrimitiveArray<T, NULLABLE, Buffer>>,

Available on crate feature arrow-rs only.
source§

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

Converts to this type from the input type.
source§

impl<T: FixedSize, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for FixedSizePrimitiveArray<T, true, Buffer>
where <Buffer as BufferType>::Buffer<T>: Length, Bitmap<Buffer>: FromIterator<bool>,

source§

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

Converts to this type from the input type.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for PrimitiveArray<U>
where ScalarBuffer<T>: From<<Buffer as BufferType>::Buffer<T>>,

Available on crate feature arrow-rs only.
source§

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

Converts to this type from the input type.
source§

impl<T: FixedSize, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for ScalarBuffer<T>
where <Buffer as BufferType>::Buffer<T>: Into<ScalarBuffer<T>>,

Available on crate feature arrow-rs only.
source§

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

Converts to this type from the input type.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<FixedSizePrimitiveArray<T, true, Buffer>> for PrimitiveArray<U>
where ScalarBuffer<T>: From<<Buffer as BufferType>::Buffer<T>>, NullBuffer: From<Bitmap<Buffer>>,

Available on crate feature arrow-rs only.
source§

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

Converts to this type from the input type.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, false, Buffer>
where <Buffer as BufferType>::Buffer<T>: From<ScalarBuffer<T>>,

Available on crate feature arrow-rs only.

Panics when there are nulls.

source§

fn from(value: PrimitiveArray<U>) -> Self

Converts to this type from the input type.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, true, Buffer>
where <Buffer as BufferType>::Buffer<T>: From<ScalarBuffer<T>>, Bitmap<Buffer>: From<NullBuffer> + FromIterator<bool>,

Available on crate feature arrow-rs only.
source§

fn from(value: PrimitiveArray<U>) -> Self

Converts to this type from the input type.
source§

impl<T: FixedSize, Buffer: BufferType> From<ScalarBuffer<T>> for FixedSizePrimitiveArray<T, false, Buffer>
where <Buffer as BufferType>::Buffer<T>: From<ScalarBuffer<T>>,

Available on crate feature arrow-rs only.
source§

fn from(value: ScalarBuffer<T>) -> Self

Converts to this type from the input type.
source§

impl<T: FixedSize, const NULLABLE: bool, U, Buffer: BufferType> FromIterator<U> for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> 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<T: FixedSize, I: SliceIndex<[T]>, Buffer: BufferType> Index<I> for FixedSizePrimitiveArray<T, false, Buffer>
where <Buffer as BufferType>::Buffer<T>: Index<I, Output = <I as SliceIndex<[T]>>::Output>,

source§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: FixedSize, Buffer: BufferType, const NULLABLE: bool> Index for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Index,

source§

type Item<'a> = <<<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer> as Index>::Item<'a> where Self: 'a

The item.
source§

unsafe fn index_unchecked(&self, index: usize) -> Self::Item<'_>

Returns the value at given index. Skips bound checking. Read more
source§

fn index(&self, index: usize) -> Option<Self::Item<'_>>

Returns the value at given index. Returns None if the index is out of range.
source§

fn index_checked(&self, index: usize) -> Self::Item<'_>

Returns the value at given index. Panics if the index is out of bounds. Read more
source§

impl<'a, T: FixedSize, const NULLABLE: bool, Buffer: BufferType> IntoIterator for &'a FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, &'a <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

source§

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

The type of the elements being iterated over.
source§

type IntoIter = <&'a <<Buffer as BufferType>::Buffer<T> 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: FixedSize, const NULLABLE: bool, Buffer: BufferType> IntoIterator for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

source§

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

The type of the elements being iterated over.
source§

type IntoIter = <<<Buffer as BufferType>::Buffer<T> 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: FixedSize, const NULLABLE: bool, Buffer: BufferType> Length for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <Buffer as BufferType>::Buffer<T>: Validity<NULLABLE>, <<Buffer as BufferType>::Buffer<T> 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: FixedSize, Buffer: BufferType> PartialEq<[Option<T>]> for FixedSizePrimitiveArray<T, true, Buffer>
where for<'a> &'a Self: IntoIterator<Item = Option<T>>,

source§

fn eq(&self, other: &[Option<T>]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: FixedSize, Buffer: BufferType> PartialEq<[T]> for FixedSizePrimitiveArray<T, false, Buffer>
where <Buffer as BufferType>::Buffer<T>: PartialEq<[T]>,

source§

fn eq(&self, other: &[T]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> PartialEq<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, false, Buffer>

Available on crate feature arrow-rs only.
source§

fn eq(&self, other: &PrimitiveArray<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> PartialEq<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, true, Buffer>
where for<'a> &'a Self: IntoIterator<Item = Option<&'a T>>,

Available on crate feature arrow-rs only.
source§

fn eq(&self, other: &PrimitiveArray<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: FixedSize, Buffer: BufferType> PartialEq for FixedSizePrimitiveArray<T, false, Buffer>

source§

fn eq(&self, _other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: FixedSize, Buffer: BufferType> ValidityBitmap for FixedSizePrimitiveArray<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 FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Freeze,

§

impl<T, const NULLABLE: bool, Buffer> RefUnwindSafe for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: RefUnwindSafe,

§

impl<T, const NULLABLE: bool, Buffer> Send for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Send,

§

impl<T, const NULLABLE: bool, Buffer> Sync for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Sync,

§

impl<T, const NULLABLE: bool, Buffer> Unpin for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer>: Unpin,

§

impl<T, const NULLABLE: bool, Buffer> UnwindSafe for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
where <<Buffer as BufferType>::Buffer<T> 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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

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>,

source§

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,