Trait re_viewer::external::re_chunk::ArrowArray
pub trait ArrowArray: Send + Sync + DynClone + 'static {
Show 16 methods
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
fn len(&self) -> usize;
fn data_type(&self) -> &DataType;
fn validity(&self) -> Option<&Bitmap>;
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 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 downcasted to concrete types according to the Array::data_type
.
Required Methods§
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts itself to a reference of Any
, which enables downcasting to concrete types.
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts itself to a mutable reference of Any
, which enables mutable downcasting to concrete types.
fn len(&self) -> usize
fn len(&self) -> usize
The length of the Array
. Every array has a length corresponding to the number of
elements (slots).
fn data_type(&self) -> &DataType
fn data_type(&self) -> &DataType
The DataType
of the Array
. In combination with Array::as_any
, this can be
used to downcast trait objects (dyn Array
) to concrete arrays.
unsafe fn slice_unchecked(&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 with_validity(&self, validity: Option<Bitmap>) -> Box<dyn Array>
Provided Methods§
fn null_count(&self) -> usize
fn null_count(&self) -> usize
unsafe fn is_null_unchecked(&self, i: usize) -> bool
unsafe fn is_null_unchecked(&self, i: usize) -> bool
unsafe fn sliced_unchecked(
&self,
offset: usize,
length: usize
) -> Box<dyn Array>
unsafe fn sliced_unchecked( &self, offset: usize, length: usize ) -> Box<dyn Array>
Trait Implementations§
§impl<O> PartialEq<&(dyn Array + 'static)> for BinaryArray<O>where
O: Offset,
impl<O> PartialEq<&(dyn Array + 'static)> for BinaryArray<O>where
O: Offset,
§impl PartialEq<&(dyn Array + 'static)> for BooleanArray
impl PartialEq<&(dyn Array + 'static)> for BooleanArray
§impl<K> PartialEq<&(dyn Array + 'static)> for DictionaryArray<K>where
K: DictionaryKey,
impl<K> PartialEq<&(dyn Array + 'static)> for DictionaryArray<K>where
K: DictionaryKey,
§impl PartialEq<&(dyn Array + 'static)> for FixedSizeBinaryArray
impl PartialEq<&(dyn Array + 'static)> for FixedSizeBinaryArray
§impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
§impl<O> PartialEq<&(dyn Array + 'static)> for ListArray<O>where
O: Offset,
impl<O> PartialEq<&(dyn Array + 'static)> for ListArray<O>where
O: Offset,
§impl PartialEq<&(dyn Array + 'static)> for MapArray
impl PartialEq<&(dyn Array + 'static)> for MapArray
§impl PartialEq<&(dyn Array + 'static)> for NullArray
impl PartialEq<&(dyn Array + 'static)> for NullArray
§impl<T> PartialEq<&(dyn Array + 'static)> for PrimitiveArray<T>where
T: NativeType,
impl<T> PartialEq<&(dyn Array + 'static)> for PrimitiveArray<T>where
T: NativeType,
§impl PartialEq<&(dyn Array + 'static)> for StructArray
impl PartialEq<&(dyn Array + 'static)> for StructArray
§impl PartialEq<&(dyn Array + 'static)> for UnionArray
impl PartialEq<&(dyn Array + 'static)> for UnionArray
§impl<O> PartialEq<&(dyn Array + 'static)> for Utf8Array<O>where
O: Offset,
impl<O> PartialEq<&(dyn Array + 'static)> for Utf8Array<O>where
O: Offset,
§impl<O> PartialEq<BinaryArray<O>> for &(dyn Array + 'static)where
O: Offset,
impl<O> PartialEq<BinaryArray<O>> for &(dyn Array + 'static)where
O: Offset,
§fn eq(&self, other: &BinaryArray<O>) -> bool
fn eq(&self, other: &BinaryArray<O>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<T> PartialEq<PrimitiveArray<T>> for &(dyn Array + 'static)where
T: NativeType,
impl<T> PartialEq<PrimitiveArray<T>> for &(dyn Array + 'static)where
T: NativeType,
§fn eq(&self, other: &PrimitiveArray<T>) -> bool
fn eq(&self, other: &PrimitiveArray<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<O> PartialEq<Utf8Array<O>> for &(dyn Array + 'static)where
O: Offset,
impl<O> PartialEq<Utf8Array<O>> for &(dyn Array + 'static)where
O: Offset,
§impl PartialEq<dyn Array> for Arc<dyn Array + '_>
impl PartialEq<dyn Array> for Arc<dyn Array + '_>
§impl PartialEq<dyn Array> for Box<dyn Array + '_>
impl PartialEq<dyn Array> for Box<dyn Array + '_>
§impl PartialEq for dyn Array + '_
impl PartialEq for dyn Array + '_
source§impl SizeBytes for Box<dyn Array>
impl SizeBytes for Box<dyn Array>
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Returns the total size of
self
on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
Returns the total size of
self
in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
Returns the total size of
self
on the stack, in bytes. Read moresource§impl SizeBytes for dyn Array
impl SizeBytes for dyn Array
source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
Returns the total size of
self
on the heap, in bytes.source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
Returns the total size of
self
in bytes, accounting for both stack and heap space.source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
Returns the total size of
self
on the stack, in bytes. Read more