Struct arrow2::array::MutableStructArray
source · [−]pub struct MutableStructArray { /* private fields */ }
Expand description
Converting a MutableStructArray
into a StructArray
is O(1)
.
Implementations
sourceimpl 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 from_data(
data_type: DataType,
values: Vec<Box<dyn MutableArray>>,
validity: Option<MutableBitmap>
) -> Self
pub fn from_data(
data_type: DataType,
values: Vec<Box<dyn MutableArray>>,
validity: Option<MutableBitmap>
) -> Self
Create a MutableStructArray
out of low-end APIs.
Panics
This function panics 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_data(
self
) -> (DataType, Vec<Box<dyn MutableArray>>, Option<MutableBitmap>)
pub fn into_data(
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>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn mut_values(&mut self) -> &mut Vec<Box<dyn MutableArray>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The mutable values
sourceimpl 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
sourceimpl Debug for MutableStructArray
impl Debug for MutableStructArray
sourceimpl From<MutableStructArray> for StructArray
impl From<MutableStructArray> for StructArray
sourcefn from(other: MutableStructArray) -> Self
fn from(other: MutableStructArray) -> Self
Converts to this type from the input type.
sourceimpl MutableArray for MutableStructArray
impl MutableArray for MutableStructArray
sourcefn validity(&self) -> Option<&MutableBitmap>
fn validity(&self) -> Option<&MutableBitmap>
The optional validity of the array.
sourcefn as_arc(&mut self) -> Arc<dyn Array>
fn as_arc(&mut self) -> Arc<dyn Array>
Convert itself to an (immutable) atomically reference counted Array
.
sourcefn 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.
sourcefn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrink the array to fit its length.
Auto Trait Implementations
impl !RefUnwindSafe for MutableStructArray
impl Send for MutableStructArray
impl Sync for MutableStructArray
impl Unpin for MutableStructArray
impl !UnwindSafe for MutableStructArray
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more