Skip to main content

Array

Enum Array 

Source
#[non_exhaustive]
pub enum Array {
Show 38 variants Null(NullArray), Boolean(BooleanArray), Int8(PrimitiveArray<i8>), Int16(PrimitiveArray<i16>), Int32(PrimitiveArray<i32>), Int64(PrimitiveArray<i64>), UInt8(PrimitiveArray<u8>), UInt16(PrimitiveArray<u16>), UInt32(PrimitiveArray<u32>), UInt64(PrimitiveArray<u64>), Float16(PrimitiveArray<f16>), Float32(PrimitiveArray<f32>), Float64(PrimitiveArray<f64>), Date32(PrimitiveArray<i32>), Date64(PrimitiveArray<i64>), Time32(TimeArray<i32>), Time64(TimeArray<i64>), Timestamp(TimestampArray), Duration(TimeArray<i64>), YearMonthInterval(PrimitiveArray<i32>), DayTimeInterval(PrimitiveArray<DayTimeInterval>), MonthDayNanoInterval(PrimitiveArray<MonthDayNanoInterval>), Utf8(BytesArray<i32>), LargeUtf8(BytesArray<i64>), Utf8View(BytesViewArray), Binary(BytesArray<i32>), LargeBinary(BytesArray<i64>), FixedSizeBinary(FixedSizeBinaryArray), BinaryView(BytesViewArray), Decimal128(DecimalArray<i128>), Struct(StructArray), List(ListArray<i32>), LargeList(ListArray<i64>), FixedSizeList(FixedSizeListArray), Dictionary(DictionaryArray), RunEndEncoded(RunEndEncodedArray), Map(MapArray), Union(UnionArray),
}
Expand description

An array with owned data

The corresponding view is View.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Null(NullArray)

An array without data

§

Boolean(BooleanArray)

bool array

§

Int8(PrimitiveArray<i8>)

i8 array

§

Int16(PrimitiveArray<i16>)

i16 array

§

Int32(PrimitiveArray<i32>)

i32 array

§

Int64(PrimitiveArray<i64>)

i64 array

§

UInt8(PrimitiveArray<u8>)

u8 array

§

UInt16(PrimitiveArray<u16>)

u16 array

§

UInt32(PrimitiveArray<u32>)

u32 array

§

UInt64(PrimitiveArray<u64>)

u64 array

§

Float16(PrimitiveArray<f16>)

f16 array

§

Float32(PrimitiveArray<f32>)

f32 array

§

Float64(PrimitiveArray<f64>)

f64 array

§

Date32(PrimitiveArray<i32>)

An i32 array of dates

§

Date64(PrimitiveArray<i64>)

An i64 array of dates

§

Time32(TimeArray<i32>)

An i32 array of times

§

Time64(TimeArray<i64>)

An i64 array of times

§

Timestamp(TimestampArray)

An i64 array of timestamps

§

Duration(TimeArray<i64>)

An i64 array of durations

§

YearMonthInterval(PrimitiveArray<i32>)

Interval with YearMonth unit

Interval arrays are not supported for arrow2.

§

DayTimeInterval(PrimitiveArray<DayTimeInterval>)

Interval with DayTime unit

Interval arrays are not supported for arrow2.

§

MonthDayNanoInterval(PrimitiveArray<MonthDayNanoInterval>)

Interval with MonthDayNano unit

Interval arrays are not supported for arrow2.

§

Utf8(BytesArray<i32>)

A [u8] array with i32 offsets interpreted as strings

§

LargeUtf8(BytesArray<i64>)

A [u8] array with i64 offsets interpreted as strings

§

Utf8View(BytesViewArray)

A [u8] array interpreted as strings with support for small inlined slices and references to external buffers

§

Binary(BytesArray<i32>)

A [u8] array with i32 offsets

§

LargeBinary(BytesArray<i64>)

A [u8] array with i64 offsets

§

FixedSizeBinary(FixedSizeBinaryArray)

A [u8; N] array with i32 offsets

§

BinaryView(BytesViewArray)

A [u8] array with support for small inlined slices and references to external buffers

§

Decimal128(DecimalArray<i128>)

An i128 array of decimals

§

Struct(StructArray)

An array of structs

§

List(ListArray<i32>)

An array of lists with i32 offsets

§

LargeList(ListArray<i64>)

An array of lists with i64 offsets

§

FixedSizeList(FixedSizeListArray)

An array of fixed sized list with i32 offsets

§

Dictionary(DictionaryArray)

An array of dictionaries

§

RunEndEncoded(RunEndEncodedArray)

An array of run end encoded values

§

Map(MapArray)

An array of maps

§

Union(UnionArray)

An array of unions

Implementations§

Source§

impl Array

Source

pub fn data_type(&self) -> DataType

Get the data type of this array

Source

pub fn as_view(&self) -> View<'_>

Get the view for this array

While the data of the arrays is borrowed, any metadata is copied (e.g., field definitions for structs). The reason is that views may be constructed from foreign Arrow implementation with different ways to store metadata.

Trait Implementations§

Source§

impl Clone for Array

Source§

fn clone(&self) -> Array

Returns a duplicate 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 Debug for Array

Source§

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

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

impl PartialEq for Array

Source§

fn eq(&self, other: &Array) -> 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.
§

impl TryFrom<Array> for Arc<dyn Array>

Conversion to arrow arrays (requires one of the arrow-{version} features)

§

type Error = MarrowError

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

fn try_from(value: Array) -> Result<Arc<dyn Array>>

Performs the conversion.
§

impl TryFrom<Array> for Box<dyn Array>

Conversion to arrow2 arrays (requires one of the arrow2-{version} features)

§

type Error = MarrowError

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

fn try_from(value: Array) -> Result<Self>

Performs the conversion.
Source§

impl StructuralPartialEq for Array

Auto Trait Implementations§

§

impl Freeze for Array

§

impl RefUnwindSafe for Array

§

impl Send for Array

§

impl Sync for Array

§

impl Unpin for Array

§

impl UnsafeUnpin for Array

§

impl UnwindSafe for Array

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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,