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,
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,
sourcepub fn iter(
&self,
) -> <&<<Buffer as BufferType>::Buffer<T> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter
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>
impl<T, const NULLABLE: bool, Buffer: BufferType> Array for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
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.
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§impl<T: FixedSize, Buffer: BufferType> AsRef<[T]> for FixedSizePrimitiveArray<T, false, Buffer>
impl<T: FixedSize, Buffer: BufferType> AsRef<[T]> for FixedSizePrimitiveArray<T, false, Buffer>
source§impl<T: FixedSize, Buffer: BufferType> BitmapRef for FixedSizePrimitiveArray<T, true, Buffer>
impl<T: FixedSize, Buffer: BufferType> BitmapRef for FixedSizePrimitiveArray<T, true, Buffer>
source§impl<T: FixedSize, Buffer: BufferType> BitmapRefMut for FixedSizePrimitiveArray<T, true, Buffer>
impl<T: FixedSize, Buffer: BufferType> BitmapRefMut for FixedSizePrimitiveArray<T, true, Buffer>
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,
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§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,
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§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,
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§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>,
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)
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)
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)
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.
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§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.
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
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>
impl<T: FixedSize, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for FixedSizePrimitiveArray<T, true, Buffer>
source§fn from(value: FixedSizePrimitiveArray<T, false, Buffer>) -> Self
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>
Available on crate feature arrow-rs only.
impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for PrimitiveArray<U>
Available on crate feature
arrow-rs only.source§fn from(value: FixedSizePrimitiveArray<T, false, Buffer>) -> Self
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>
Available on crate feature arrow-rs only.
impl<T: FixedSize, Buffer: BufferType> From<FixedSizePrimitiveArray<T, false, Buffer>> for ScalarBuffer<T>
Available on crate feature
arrow-rs only.source§fn from(value: FixedSizePrimitiveArray<T, false, Buffer>) -> Self
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>
Available on crate feature arrow-rs only.
impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<FixedSizePrimitiveArray<T, true, Buffer>> for PrimitiveArray<U>
Available on crate feature
arrow-rs only.source§fn from(value: FixedSizePrimitiveArray<T, true, Buffer>) -> Self
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>
Available on crate feature arrow-rs only.
impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> From<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, false, Buffer>
Available on crate feature
arrow-rs only.Panics when there are nulls.
source§fn from(value: PrimitiveArray<U>) -> Self
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.
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
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>
Available on crate feature arrow-rs only.
impl<T: FixedSize, Buffer: BufferType> From<ScalarBuffer<T>> for FixedSizePrimitiveArray<T, false, Buffer>
Available on crate feature
arrow-rs only.source§fn from(value: ScalarBuffer<T>) -> Self
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>,
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
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>
impl<T: FixedSize, I: SliceIndex<[T]>, Buffer: BufferType> Index<I> for FixedSizePrimitiveArray<T, false, Buffer>
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,
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
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<'_>
unsafe fn index_unchecked(&self, index: usize) -> Self::Item<'_>
Returns the value at given index. Skips bound checking. 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,
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
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
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§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,
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
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
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§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,
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§impl<T: FixedSize, Buffer: BufferType> PartialEq<[Option<T>]> for FixedSizePrimitiveArray<T, true, Buffer>where
for<'a> &'a Self: IntoIterator<Item = Option<T>>,
impl<T: FixedSize, Buffer: BufferType> PartialEq<[Option<T>]> for FixedSizePrimitiveArray<T, true, Buffer>where
for<'a> &'a Self: IntoIterator<Item = Option<T>>,
source§impl<T: FixedSize, Buffer: BufferType> PartialEq<[T]> for FixedSizePrimitiveArray<T, false, Buffer>
impl<T: FixedSize, Buffer: BufferType> PartialEq<[T]> for FixedSizePrimitiveArray<T, false, Buffer>
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.
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§impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> PartialEq<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, true, Buffer>
Available on crate feature arrow-rs only.
impl<T: FixedSize, U: ArrowPrimitiveType<Native = T>, Buffer: BufferType> PartialEq<PrimitiveArray<U>> for FixedSizePrimitiveArray<T, true, Buffer>
Available on crate feature
arrow-rs only.source§impl<T: FixedSize, Buffer: BufferType> PartialEq for FixedSizePrimitiveArray<T, false, Buffer>
impl<T: FixedSize, Buffer: BufferType> PartialEq for FixedSizePrimitiveArray<T, false, Buffer>
source§impl<T: FixedSize, Buffer: BufferType> ValidityBitmap for FixedSizePrimitiveArray<T, true, Buffer>
impl<T: FixedSize, Buffer: BufferType> ValidityBitmap for FixedSizePrimitiveArray<T, true, Buffer>
source§fn is_null(&self, index: usize) -> Option<bool>
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
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 moresource§fn null_count(&self) -> usize
fn null_count(&self) -> usize
Returns the number of null elements.
source§fn is_valid(&self, index: usize) -> Option<bool>
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
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 moresource§fn valid_count(&self) -> usize
fn valid_count(&self) -> usize
Returns the number of valid elements.
Auto Trait Implementations§
impl<T, const NULLABLE: bool, Buffer> Freeze for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
impl<T, const NULLABLE: bool, Buffer> RefUnwindSafe for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
impl<T, const NULLABLE: bool, Buffer> Send for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
impl<T, const NULLABLE: bool, Buffer> Sync for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
impl<T, const NULLABLE: bool, Buffer> Unpin for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
impl<T, const NULLABLE: bool, Buffer> UnwindSafe for FixedSizePrimitiveArray<T, NULLABLE, Buffer>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)