Struct rerun::external::re_data_store::external::arrow2::array::FixedSizeListArray
source · pub struct FixedSizeListArray { /* private fields */ }
Expand description
The Arrow’s equivalent to an immutable Vec<Option<[T; size]>>
where T
is an Arrow type.
Cloning and slicing this struct is O(1)
.
Implementations§
source§impl<'a> FixedSizeListArray
impl<'a> FixedSizeListArray
sourcepub fn iter(
&'a self
) -> ZipValidity<Box<dyn Array>, ArrayValuesIter<'a, FixedSizeListArray>, BitmapIter<'a>> ⓘ
pub fn iter( &'a self ) -> ZipValidity<Box<dyn Array>, ArrayValuesIter<'a, FixedSizeListArray>, BitmapIter<'a>> ⓘ
Returns an iterator of Option<Box<dyn Array>>
sourcepub fn values_iter(&'a self) -> ArrayValuesIter<'a, FixedSizeListArray> ⓘ
pub fn values_iter(&'a self) -> ArrayValuesIter<'a, FixedSizeListArray> ⓘ
Returns an iterator of Box<dyn Array>
source§impl FixedSizeListArray
impl FixedSizeListArray
sourcepub fn try_new(
data_type: DataType,
values: Box<dyn Array>,
validity: Option<Bitmap>
) -> Result<FixedSizeListArray, Error>
pub fn try_new( data_type: DataType, values: Box<dyn Array>, validity: Option<Bitmap> ) -> Result<FixedSizeListArray, Error>
Creates a new FixedSizeListArray
.
§Errors
This function returns an error iff:
- The
data_type
’s physical type is notcrate::datatypes::PhysicalType::FixedSizeList
- The
data_type
’s inner field’s data type is not equal tovalues.data_type
. - The length of
values
is not a multiple ofsize
indata_type
- the validity’s length is not equal to
values.len() / size
.
sourcepub fn new(
data_type: DataType,
values: Box<dyn Array>,
validity: Option<Bitmap>
) -> FixedSizeListArray
pub fn new( data_type: DataType, values: Box<dyn Array>, validity: Option<Bitmap> ) -> FixedSizeListArray
Alias to Self::try_new(...).unwrap()
sourcepub const fn size(&self) -> usize
pub const fn size(&self) -> usize
Returns the size (number of elements per slot) of this FixedSizeListArray
.
sourcepub fn new_empty(data_type: DataType) -> FixedSizeListArray
pub fn new_empty(data_type: DataType) -> FixedSizeListArray
Returns a new empty FixedSizeListArray
.
sourcepub fn new_null(data_type: DataType, length: usize) -> FixedSizeListArray
pub fn new_null(data_type: DataType, length: usize) -> FixedSizeListArray
Returns a new null FixedSizeListArray
.
source§impl FixedSizeListArray
impl FixedSizeListArray
sourcepub fn slice(&mut self, offset: usize, length: usize)
pub fn slice(&mut self, offset: usize, length: usize)
Slices this FixedSizeListArray
.
§Implementation
This operation is O(1)
.
§Panics
panics iff offset + length > self.len()
sourcepub unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
pub unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
Slices this FixedSizeListArray
.
§Implementation
This operation is O(1)
.
§Safety
The caller must ensure that offset + length <= self.len()
.
sourcepub fn sliced(self, offset: usize, length: usize) -> FixedSizeListArray
pub fn sliced(self, offset: usize, length: usize) -> FixedSizeListArray
sourcepub unsafe fn sliced_unchecked(
self,
offset: usize,
length: usize
) -> FixedSizeListArray
pub unsafe fn sliced_unchecked( self, offset: usize, length: usize ) -> FixedSizeListArray
sourcepub fn with_validity(self, validity: Option<Bitmap>) -> FixedSizeListArray
pub fn with_validity(self, validity: Option<Bitmap>) -> FixedSizeListArray
sourcepub fn set_validity(&mut self, validity: Option<Bitmap>)
pub fn set_validity(&mut self, validity: Option<Bitmap>)
sourcepub fn boxed(self) -> Box<dyn Array>
pub fn boxed(self) -> Box<dyn Array>
Boxes this array into a Box<dyn Array>
.
sourcepub fn arced(self) -> Arc<dyn Array>
pub fn arced(self) -> Arc<dyn Array>
Arcs this array into a std::sync::Arc<dyn Array>
.
source§impl FixedSizeListArray
impl FixedSizeListArray
source§impl FixedSizeListArray
impl FixedSizeListArray
sourcepub fn default_datatype(data_type: DataType, size: usize) -> DataType
pub fn default_datatype(data_type: DataType, size: usize) -> DataType
Returns a DataType
consistent with FixedSizeListArray
.
Trait Implementations§
source§impl Array for FixedSizeListArray
impl Array for FixedSizeListArray
source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any
, which enables downcasting to concrete types.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any
, which enables mutable downcasting to concrete types.source§fn len(&self) -> usize
fn len(&self) -> usize
Array
. Every array has a length corresponding to the number of
elements (slots).source§fn data_type(&self) -> &DataType
fn data_type(&self) -> &DataType
DataType
of the Array
. In combination with Array::as_any
, this can be
used to downcast trait objects (dyn Array
) to concrete arrays.source§unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
source§unsafe fn is_null_unchecked(&self, i: usize) -> bool
unsafe fn is_null_unchecked(&self, i: usize) -> bool
i
is null. Read moresource§impl Clone for FixedSizeListArray
impl Clone for FixedSizeListArray
source§fn clone(&self) -> FixedSizeListArray
fn clone(&self) -> FixedSizeListArray
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FixedSizeListArray
impl Debug for FixedSizeListArray
source§impl<'a> From<GrowableFixedSizeList<'a>> for FixedSizeListArray
impl<'a> From<GrowableFixedSizeList<'a>> for FixedSizeListArray
source§fn from(val: GrowableFixedSizeList<'a>) -> FixedSizeListArray
fn from(val: GrowableFixedSizeList<'a>) -> FixedSizeListArray
source§impl<M> From<MutableFixedSizeListArray<M>> for FixedSizeListArraywhere
M: MutableArray,
impl<M> From<MutableFixedSizeListArray<M>> for FixedSizeListArraywhere
M: MutableArray,
source§fn from(other: MutableFixedSizeListArray<M>) -> FixedSizeListArray
fn from(other: MutableFixedSizeListArray<M>) -> FixedSizeListArray
source§impl<'a> IntoIterator for &'a FixedSizeListArray
impl<'a> IntoIterator for &'a FixedSizeListArray
§type IntoIter = ZipValidity<Box<dyn Array>, ArrayValuesIter<'a, FixedSizeListArray>, BitmapIter<'a>>
type IntoIter = ZipValidity<Box<dyn Array>, ArrayValuesIter<'a, FixedSizeListArray>, BitmapIter<'a>>
source§fn into_iter(self) -> <&'a FixedSizeListArray as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a FixedSizeListArray as IntoIterator>::IntoIter
source§impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
impl PartialEq<&(dyn Array + 'static)> for FixedSizeListArray
source§impl PartialEq for FixedSizeListArray
impl PartialEq for FixedSizeListArray
source§fn eq(&self, other: &FixedSizeListArray) -> bool
fn eq(&self, other: &FixedSizeListArray) -> bool
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl Freeze for FixedSizeListArray
impl !RefUnwindSafe for FixedSizeListArray
impl Send for FixedSizeListArray
impl Sync for FixedSizeListArray
impl Unpin for FixedSizeListArray
impl !UnwindSafe for FixedSizeListArray
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.