Struct arrow2::array::MutableListArray
source · [−]pub struct MutableListArray<O: Offset, M: MutableArray> { /* private fields */ }
Expand description
The mutable version of ListArray
.
Implementations
sourceimpl<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.
sourceimpl<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 offsets(&self) -> &Vec<O>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn offsets(&self) -> &Vec<O>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The offsets
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
sourceimpl<O: Debug + Offset, M: Debug + MutableArray> Debug for MutableListArray<O, M>
impl<O: Debug + Offset, M: Debug + MutableArray> Debug for MutableListArray<O, M>
sourceimpl<O: Offset, M: MutableArray + Default> Default for MutableListArray<O, M>
impl<O: Offset, M: MutableArray + Default> Default for MutableListArray<O, M>
sourceimpl<O: Offset, M: MutableArray> From<MutableListArray<O, M>> for ListArray<O>
impl<O: Offset, M: MutableArray> From<MutableListArray<O, M>> for ListArray<O>
sourcefn from(other: MutableListArray<O, M>) -> Self
fn from(other: MutableListArray<O, M>) -> Self
Converts to this type from the input type.
sourceimpl<O: Offset, M: MutableArray + 'static> MutableArray for MutableListArray<O, M>
impl<O: Offset, M: MutableArray + 'static> MutableArray for MutableListArray<O, M>
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.
sourceimpl<O, M, I, T> TryExtend<Option<I>> for MutableListArray<O, M> where
O: Offset,
M: MutableArray + TryExtend<Option<T>>,
I: IntoIterator<Item = Option<T>>,
impl<O, M, I, T> TryExtend<Option<I>> for MutableListArray<O, M> where
O: Offset,
M: MutableArray + TryExtend<Option<T>>,
I: IntoIterator<Item = Option<T>>,
sourcefn 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
.
sourceimpl<O, M, I, T> TryPush<Option<I>> for MutableListArray<O, M> where
O: Offset,
M: MutableArray + TryExtend<Option<T>>,
I: IntoIterator<Item = Option<T>>,
impl<O, M, I, T> TryPush<Option<I>> for MutableListArray<O, M> where
O: Offset,
M: MutableArray + TryExtend<Option<T>>,
I: IntoIterator<Item = Option<T>>,
Auto Trait Implementations
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> where
M: Unpin,
O: Unpin,
impl<O, M> UnwindSafe for MutableListArray<O, M> where
M: UnwindSafe,
O: UnwindSafe,
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