pub trait Array:
Send
+ Sync
+ DynClone
+ 'static {
Show 20 methods
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn len(&self) -> usize;
fn dtype(&self) -> &ArrowDataType;
fn dtype_mut(&mut self) -> &mut ArrowDataType;
fn validity(&self) -> Option<&Bitmap>;
fn split_at_boxed(&self, offset: usize) -> (Box<dyn Array>, Box<dyn Array>);
unsafe fn split_at_boxed_unchecked(
&self,
offset: usize,
) -> (Box<dyn Array>, Box<dyn Array>);
fn slice(&mut self, offset: usize, length: usize);
unsafe fn slice_unchecked(&mut self, offset: usize, length: usize);
fn with_validity(&self, validity: Option<Bitmap>) -> Box<dyn Array>;
fn to_boxed(&self) -> Box<dyn Array>;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn null_count(&self) -> usize { ... }
fn has_nulls(&self) -> bool { ... }
fn is_null(&self, i: usize) -> bool { ... }
unsafe fn is_null_unchecked(&self, i: usize) -> bool { ... }
fn is_valid(&self, i: usize) -> bool { ... }
fn sliced(&self, offset: usize, length: usize) -> Box<dyn Array> { ... }
unsafe fn sliced_unchecked(
&self,
offset: usize,
length: usize,
) -> Box<dyn Array> { ... }
}Expand description
A trait representing an immutable Arrow array. Arrow arrays are trait objects
that are infallibly downcast to concrete types according to the Array::dtype.
Required Methods§
Sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Converts itself to a reference of Any, which enables downcasting to concrete types.
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Converts itself to a mutable reference of Any, which enables mutable downcasting to concrete types.
Sourcefn len(&self) -> usize
fn len(&self) -> usize
The length of the Array. Every array has a length corresponding to the number of
elements (slots).
Sourcefn dtype(&self) -> &ArrowDataType
fn dtype(&self) -> &ArrowDataType
The ArrowDataType of the Array. In combination with Array::as_any, this can be
used to downcast trait objects (dyn Array) to concrete arrays.
fn dtype_mut(&mut self) -> &mut ArrowDataType
Sourceunsafe fn split_at_boxed_unchecked(
&self,
offset: usize,
) -> (Box<dyn Array>, Box<dyn Array>)
unsafe fn split_at_boxed_unchecked( &self, offset: usize, ) -> (Box<dyn Array>, Box<dyn Array>)
Sourceunsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
Provided Methods§
Sourcefn null_count(&self) -> usize
fn null_count(&self) -> usize
fn has_nulls(&self) -> bool
Sourceunsafe fn is_null_unchecked(&self, i: usize) -> bool
unsafe fn is_null_unchecked(&self, i: usize) -> bool
Trait Implementations§
Source§impl IntoBoxedArray for Box<dyn Array>
impl IntoBoxedArray for Box<dyn Array>
fn into_boxed(self) -> Box<dyn Array>
Source§impl<O: Offset> PartialEq<&(dyn Array + 'static)> for BinaryArray<O>
impl<O: Offset> PartialEq<&(dyn Array + 'static)> for BinaryArray<O>
Source§impl PartialEq<&(dyn Array + 'static)> for BooleanArray
impl PartialEq<&(dyn Array + 'static)> for BooleanArray
Source§impl<K: DictionaryKey> PartialEq<&(dyn Array + 'static)> for DictionaryArray<K>
impl<K: DictionaryKey> PartialEq<&(dyn Array + 'static)> for DictionaryArray<K>
Source§impl PartialEq<&(dyn Array + 'static)> for FixedSizeBinaryArray
impl PartialEq<&(dyn Array + 'static)> for FixedSizeBinaryArray
Source§impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
Source§impl<O: Offset> PartialEq<&(dyn Array + 'static)> for ListArray<O>
impl<O: Offset> PartialEq<&(dyn Array + 'static)> for ListArray<O>
Source§impl PartialEq<&(dyn Array + 'static)> for MapArray
impl PartialEq<&(dyn Array + 'static)> for MapArray
Source§impl PartialEq<&(dyn Array + 'static)> for NullArray
impl PartialEq<&(dyn Array + 'static)> for NullArray
Source§impl<T: NativeType> PartialEq<&(dyn Array + 'static)> for PrimitiveArray<T>
impl<T: NativeType> PartialEq<&(dyn Array + 'static)> for PrimitiveArray<T>
Source§impl PartialEq<&(dyn Array + 'static)> for StructArray
impl PartialEq<&(dyn Array + 'static)> for StructArray
Source§impl PartialEq<&(dyn Array + 'static)> for UnionArray
impl PartialEq<&(dyn Array + 'static)> for UnionArray
Source§impl<O: Offset> PartialEq<&(dyn Array + 'static)> for Utf8Array<O>
impl<O: Offset> PartialEq<&(dyn Array + 'static)> for Utf8Array<O>
Source§impl<O: Offset> PartialEq<BinaryArray<O>> for &dyn Array
impl<O: Offset> PartialEq<BinaryArray<O>> for &dyn Array
Source§fn eq(&self, other: &BinaryArray<O>) -> bool
fn eq(&self, other: &BinaryArray<O>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T: NativeType> PartialEq<PrimitiveArray<T>> for &dyn Array
impl<T: NativeType> PartialEq<PrimitiveArray<T>> for &dyn Array
Source§fn eq(&self, other: &PrimitiveArray<T>) -> bool
fn eq(&self, other: &PrimitiveArray<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<O: Offset> PartialEq<Utf8Array<O>> for &dyn Array
impl<O: Offset> PartialEq<Utf8Array<O>> for &dyn Array
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".