Struct arrow2::array::MutableStructArray
source · pub struct MutableStructArray { /* private fields */ }
Expand description
Converting a MutableStructArray
into a StructArray
is O(1)
.
Implementations§
source§impl MutableStructArray
impl MutableStructArray
sourcepub fn new(data_type: DataType, values: Vec<Box<dyn MutableArray>>) -> Self
pub fn new(data_type: DataType, values: Vec<Box<dyn MutableArray>>) -> Self
Creates a new MutableStructArray
.
sourcepub fn try_new(
data_type: DataType,
values: Vec<Box<dyn MutableArray>>,
validity: Option<MutableBitmap>
) -> Result<Self, Error>
pub fn try_new(
data_type: DataType,
values: Vec<Box<dyn MutableArray>>,
validity: Option<MutableBitmap>
) -> Result<Self, Error>
Create a MutableStructArray
out of low-end APIs.
Errors
This function errors iff:
data_type
is notDataType::Struct
- The inner types of
data_type
are not equal to those ofvalues
validity
is notNone
and its length is different from thevalues
’s length
sourcepub fn into_inner(
self
) -> (DataType, Vec<Box<dyn MutableArray>>, Option<MutableBitmap>)
pub fn into_inner(
self
) -> (DataType, Vec<Box<dyn MutableArray>>, Option<MutableBitmap>)
Extract the low-end APIs from the MutableStructArray
.
sourcepub fn mut_values(&mut self) -> &mut Vec<Box<dyn MutableArray>>
pub fn mut_values(&mut self) -> &mut Vec<Box<dyn MutableArray>>
The mutable values
sourcepub fn values(&self) -> &Vec<Box<dyn MutableArray>>
pub fn values(&self) -> &Vec<Box<dyn MutableArray>>
The values
source§impl MutableStructArray
impl MutableStructArray
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the MutableStructArray
to fit its current length.
Trait Implementations§
source§impl Debug for MutableStructArray
impl Debug for MutableStructArray
source§impl From<MutableStructArray> for StructArray
impl From<MutableStructArray> for StructArray
source§fn from(other: MutableStructArray) -> Self
fn from(other: MutableStructArray) -> Self
Converts to this type from the input type.
source§impl MutableArray for MutableStructArray
impl MutableArray for MutableStructArray
source§fn validity(&self) -> Option<&MutableBitmap>
fn validity(&self) -> Option<&MutableBitmap>
The optional validity of the array.
source§fn as_arc(&mut self) -> Arc<dyn Array>
fn as_arc(&mut self) -> Arc<dyn Array>
Convert itself to an (immutable) atomically reference counted
Array
.source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Convert to mutable
Any
, to enable dynamic casting.source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrink the array to fit its length.