pub struct MutableListArray<O, M>where
O: Offset,
M: MutableArray,{ /* private fields */ }
Expand description
The mutable version of ListArray
.
Implementations§
source§impl<O, M> MutableListArray<O, M>
impl<O, M> MutableListArray<O, M>
sourcepub fn new() -> MutableListArray<O, M>
pub fn new() -> MutableListArray<O, M>
Creates a new empty MutableListArray
.
sourcepub fn with_capacity(capacity: usize) -> MutableListArray<O, M>
pub fn with_capacity(capacity: usize) -> MutableListArray<O, M>
Creates a new MutableListArray
with a capacity.
source§impl<O, M> MutableListArray<O, M>where
O: Offset,
M: MutableArray,
impl<O, M> MutableListArray<O, M>where
O: Offset,
M: MutableArray,
sourcepub fn new_from(
values: M,
data_type: DataType,
capacity: usize
) -> MutableListArray<O, M>
pub fn new_from( values: M, data_type: DataType, capacity: usize ) -> MutableListArray<O, M>
Creates a new MutableListArray
from a MutableArray
and capacity.
sourcepub fn new_with_field(
values: M,
name: &str,
nullable: bool
) -> MutableListArray<O, M>
pub fn new_with_field( values: M, name: &str, nullable: bool ) -> MutableListArray<O, M>
Creates a new MutableListArray
from a MutableArray
.
sourcepub fn new_with_capacity(values: M, capacity: usize) -> MutableListArray<O, M>
pub fn new_with_capacity(values: M, capacity: usize) -> MutableListArray<O, M>
Creates a new MutableListArray
from a MutableArray
and capacity.
sourcepub fn new_from_mutable(
values: M,
offsets: Offsets<O>,
validity: Option<MutableBitmap>
) -> MutableListArray<O, M>
pub fn new_from_mutable( values: M, offsets: Offsets<O>, validity: Option<MutableBitmap> ) -> MutableListArray<O, M>
Creates a new MutableListArray
from a MutableArray
, Offsets
and
MutableBitmap
.
sourcepub fn try_push_valid(&mut self) -> Result<(), Error>
pub fn try_push_valid(&mut self) -> Result<(), Error>
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 try_extend_from_lengths<II>(&mut self, iterator: II) -> Result<(), Error>
pub fn try_extend_from_lengths<II>(&mut self, iterator: II) -> Result<(), Error>
Expand this array, using elements from the underlying backing array.
Assumes the expansion begins at the highest previous offset, or zero if
this MutableListArray
is currently empty.
Panics if:
- the new offsets are not in monotonic increasing order.
- any new offset is not in bounds of the backing array.
- the passed iterator has no upper bound.
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, M> Clone for MutableListArray<O, M>
impl<O, M> Clone for MutableListArray<O, M>
source§fn clone(&self) -> MutableListArray<O, M>
fn clone(&self) -> MutableListArray<O, M>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<O, M> Debug for MutableListArray<O, M>
impl<O, M> Debug for MutableListArray<O, M>
source§impl<O, M> Default for MutableListArray<O, M>
impl<O, M> Default for MutableListArray<O, M>
source§fn default() -> MutableListArray<O, M>
fn default() -> MutableListArray<O, M>
source§impl<O, M> From<MutableListArray<O, M>> for ListArray<O>where
O: Offset,
M: MutableArray,
impl<O, M> From<MutableListArray<O, M>> for ListArray<O>where
O: Offset,
M: MutableArray,
source§fn from(other: MutableListArray<O, M>) -> ListArray<O>
fn from(other: MutableListArray<O, M>) -> ListArray<O>
source§impl<O, M> MutableArray for MutableListArray<O, M>where
O: Offset,
M: MutableArray + 'static,
impl<O, M> MutableArray for MutableListArray<O, M>where
O: Offset,
M: MutableArray + 'static,
source§fn validity(&self) -> Option<&MutableBitmap>
fn validity(&self) -> Option<&MutableBitmap>
source§fn as_arc(&mut self) -> Arc<dyn Array>
fn as_arc(&mut self) -> Arc<dyn Array>
Array
.source§fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)
fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)
Any
, to enable dynamic casting.source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
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>(&mut self, iter: II) -> Result<(), Error>where
II: IntoIterator<Item = Option<I>>,
fn try_extend<II>(&mut self, iter: II) -> Result<(), Error>where
II: IntoIterator<Item = Option<I>>,
Extend::extend
.source§impl<O, M> TryExtendFromSelf for MutableListArray<O, M>
impl<O, M> TryExtendFromSelf for MutableListArray<O, M>
source§fn try_extend_from_self(
&mut self,
other: &MutableListArray<O, M>
) -> Result<(), Error>
fn try_extend_from_self( &mut self, other: &MutableListArray<O, M> ) -> Result<(), Error>
other
, failing only on overflow.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,
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
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more