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 ArrayFromIterDtype<Box<dyn Array>> for FixedSizeListArray
impl ArrayFromIterDtype<Box<dyn Array>> for FixedSizeListArray
fn arr_from_iter_with_dtype<I: IntoIterator<Item = Box<dyn Array>>>( dtype: ArrowDataType, iter: I, ) -> Self
fn try_arr_from_iter_with_dtype<E, I: IntoIterator<Item = Result<Box<dyn Array>, E>>>( dtype: ArrowDataType, iter: I, ) -> Result<Self, E>
fn arr_from_iter_trusted_with_dtype<I>(dtype: ArrowDataType, iter: I) -> Self
fn try_arr_from_iter_trusted_with_dtype<E, I>( dtype: ArrowDataType, iter: I, ) -> Result<Self, E>
Source§impl IntoBoxedArray for Box<dyn Array>
impl IntoBoxedArray for Box<dyn Array>
fn into_boxed(self) -> Box<dyn Array>
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 BooleanArray
impl PartialEq<&(dyn Array + 'static)> for BooleanArray
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 PartialEq<&(dyn Array + 'static)> for StructArray
impl PartialEq<&(dyn Array + 'static)> for StructArray
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 UnionArray
impl PartialEq<&(dyn Array + 'static)> for UnionArray
Source§impl<T: NativeType> PartialEq<PrimitiveArray<T>> for &dyn Array
impl<T: NativeType> PartialEq<PrimitiveArray<T>> for &dyn Array
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".