Struct arrow2::array::MutableListArray
source · pub struct MutableListArray<O: Offset, M: MutableArray> { /* private fields */ }
Expand description
The mutable version of ListArray
.
Implementations§
source§impl<O: Offset, M: MutableArray + Default> MutableListArray<O, M>
impl<O: Offset, M: MutableArray + Default> MutableListArray<O, M>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty MutableListArray
.
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new MutableListArray
with a capacity.
source§impl<O: Offset, M: MutableArray> MutableListArray<O, M>
impl<O: Offset, M: MutableArray> MutableListArray<O, M>
sourcepub fn new_from(values: M, data_type: DataType, capacity: usize) -> Self
pub fn new_from(values: M, data_type: DataType, capacity: usize) -> Self
Creates a new MutableListArray
from a MutableArray
and capacity.
sourcepub fn new_with_field(values: M, name: &str, nullable: bool) -> Self
pub fn new_with_field(values: M, name: &str, nullable: bool) -> Self
Creates a new MutableListArray
from a MutableArray
.
sourcepub fn new_with_capacity(values: M, capacity: usize) -> Self
pub fn new_with_capacity(values: M, capacity: usize) -> Self
Creates a new MutableListArray
from a MutableArray
and capacity.
sourcepub fn try_push_valid(&mut self) -> Result<()>
pub fn try_push_valid(&mut self) -> Result<()>
Needs to be called when a valid value was extended to this array.
This is a relatively low level function, prefer try_push
when you can.
sourcepub fn mut_values(&mut self) -> &mut M
pub fn mut_values(&mut self) -> &mut M
The values
sourcepub fn into_box(self) -> Box<dyn Array>
pub fn into_box(self) -> Box<dyn Array>
converts itself into Box<dyn Array>
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the MutableListArray
to fit its current length.
Trait Implementations§
source§impl<O: Clone + Offset, M: Clone + MutableArray> Clone for MutableListArray<O, M>
impl<O: Clone + Offset, M: Clone + MutableArray> Clone for MutableListArray<O, M>
source§fn clone(&self) -> MutableListArray<O, M>
fn clone(&self) -> MutableListArray<O, M>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<O: Debug + Offset, M: Debug + MutableArray> Debug for MutableListArray<O, M>
impl<O: Debug + Offset, M: Debug + MutableArray> Debug for MutableListArray<O, M>
source§impl<O: Offset, M: MutableArray + Default> Default for MutableListArray<O, M>
impl<O: Offset, M: MutableArray + Default> Default for MutableListArray<O, M>
source§impl<O: Offset, M: MutableArray> From<MutableListArray<O, M>> for ListArray<O>
impl<O: Offset, M: MutableArray> From<MutableListArray<O, M>> for ListArray<O>
source§fn from(other: MutableListArray<O, M>) -> Self
fn from(other: MutableListArray<O, M>) -> Self
Converts to this type from the input type.
source§impl<O: Offset, M: MutableArray + 'static> MutableArray for MutableListArray<O, M>
impl<O: Offset, M: MutableArray + 'static> MutableArray for MutableListArray<O, M>
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.
source§impl<O, M, I, T> TryExtend<Option<I>> for MutableListArray<O, M>
impl<O, M, I, T> TryExtend<Option<I>> for MutableListArray<O, M>
source§fn try_extend<II: IntoIterator<Item = Option<I>>>(
&mut self,
iter: II
) -> Result<()>
fn try_extend<II: IntoIterator<Item = Option<I>>>( &mut self, iter: II ) -> Result<()>
Fallible version of
Extend::extend
.source§impl<O, M> TryExtendFromSelf for MutableListArray<O, M>
impl<O, M> TryExtendFromSelf for MutableListArray<O, M>
Auto Trait Implementations§
impl<O, M> Freeze for MutableListArray<O, M>where
M: Freeze,
impl<O, M> RefUnwindSafe for MutableListArray<O, M>where
M: RefUnwindSafe,
O: RefUnwindSafe,
impl<O, M> Send for MutableListArray<O, M>
impl<O, M> Sync for MutableListArray<O, M>
impl<O, M> Unpin for MutableListArray<O, M>
impl<O, M> UnwindSafe for MutableListArray<O, M>where
M: UnwindSafe,
O: UnwindSafe,
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
Mutably borrows from an owned value. Read more