pub struct MutableFixedSizeListArray<M: MutableArray> { /* private fields */ }
Expand description
The mutable version of FixedSizeListArray
.
Implementations§
Source§impl<M: MutableArray> MutableFixedSizeListArray<M>
impl<M: MutableArray> MutableFixedSizeListArray<M>
Sourcepub fn new(values: M, size: usize) -> Self
pub fn new(values: M, size: usize) -> Self
Creates a new MutableFixedSizeListArray
from a MutableArray
and size.
Sourcepub fn new_with_field(
values: M,
name: PlSmallStr,
nullable: bool,
size: usize,
) -> Self
pub fn new_with_field( values: M, name: PlSmallStr, nullable: bool, size: usize, ) -> Self
Creates a new MutableFixedSizeListArray
from a MutableArray
and size.
Sourcepub fn new_from(values: M, dtype: ArrowDataType, size: usize) -> Self
pub fn new_from(values: M, dtype: ArrowDataType, size: usize) -> Self
Creates a new MutableFixedSizeListArray
from a MutableArray
, ArrowDataType
and size.
Sourcepub const fn size(&self) -> usize
pub const fn size(&self) -> usize
Returns the size (number of elements per slot) of this FixedSizeListArray
.
Sourcepub fn try_push_valid(&mut self) -> PolarsResult<()>
pub fn try_push_valid(&mut self) -> PolarsResult<()>
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 push_valid(&mut self)
pub fn push_valid(&mut self)
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 shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the MutableFixedSizeListArray
to fit its current length.
Trait Implementations§
Source§impl<M: Clone + MutableArray> Clone for MutableFixedSizeListArray<M>
impl<M: Clone + MutableArray> Clone for MutableFixedSizeListArray<M>
Source§fn clone(&self) -> MutableFixedSizeListArray<M>
fn clone(&self) -> MutableFixedSizeListArray<M>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<M: Debug + MutableArray> Debug for MutableFixedSizeListArray<M>
impl<M: Debug + MutableArray> Debug for MutableFixedSizeListArray<M>
Source§impl<M: MutableArray> From<MutableFixedSizeListArray<M>> for FixedSizeListArray
impl<M: MutableArray> From<MutableFixedSizeListArray<M>> for FixedSizeListArray
Source§fn from(other: MutableFixedSizeListArray<M>) -> Self
fn from(other: MutableFixedSizeListArray<M>) -> Self
Source§impl<M: MutableArray + 'static> MutableArray for MutableFixedSizeListArray<M>
impl<M: MutableArray + 'static> MutableArray for MutableFixedSizeListArray<M>
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 dtype(&self) -> &ArrowDataType
fn dtype(&self) -> &ArrowDataType
ArrowDataType
of the array.Source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Any
, to enable dynamic casting.Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Source§impl<M, I, T> PushUnchecked<Option<I>> for MutableFixedSizeListArray<M>
impl<M, I, T> PushUnchecked<Option<I>> for MutableFixedSizeListArray<M>
Source§unsafe fn push_unchecked(&mut self, item: Option<I>)
unsafe fn push_unchecked(&mut self, item: Option<I>)
§Safety
The caller must ensure that the I
iterates exactly over size
items, where size
is the fixed size width.
Source§impl<M, I, T> TryExtend<Option<I>> for MutableFixedSizeListArray<M>
impl<M, I, T> TryExtend<Option<I>> for MutableFixedSizeListArray<M>
Source§fn try_extend<II: IntoIterator<Item = Option<I>>>(
&mut self,
iter: II,
) -> PolarsResult<()>
fn try_extend<II: IntoIterator<Item = Option<I>>>( &mut self, iter: II, ) -> PolarsResult<()>
Extend::extend
.Source§impl<M> TryExtendFromSelf for MutableFixedSizeListArray<M>where
M: MutableArray + TryExtendFromSelf,
impl<M> TryExtendFromSelf for MutableFixedSizeListArray<M>where
M: MutableArray + TryExtendFromSelf,
Source§fn try_extend_from_self(&mut self, other: &Self) -> PolarsResult<()>
fn try_extend_from_self(&mut self, other: &Self) -> PolarsResult<()>
other
, failing only on overflow.Source§impl<M, I, T> TryPush<Option<I>> for MutableFixedSizeListArray<M>
impl<M, I, T> TryPush<Option<I>> for MutableFixedSizeListArray<M>
Auto Trait Implementations§
impl<M> Freeze for MutableFixedSizeListArray<M>where
M: Freeze,
impl<M> RefUnwindSafe for MutableFixedSizeListArray<M>where
M: RefUnwindSafe,
impl<M> Send for MutableFixedSizeListArray<M>
impl<M> Sync for MutableFixedSizeListArray<M>
impl<M> Unpin for MutableFixedSizeListArray<M>where
M: Unpin,
impl<M> UnwindSafe for MutableFixedSizeListArray<M>where
M: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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