pub struct MutableStructArray { /* private fields */ }
Expand description
Converting a MutableStructArray
into a StructArray
is O(1)
.
Implementations§
Source§impl MutableStructArray
impl MutableStructArray
Sourcepub fn new(
dtype: ArrowDataType,
length: usize,
values: Vec<Box<dyn MutableArray>>,
) -> Self
pub fn new( dtype: ArrowDataType, length: usize, values: Vec<Box<dyn MutableArray>>, ) -> Self
Creates a new MutableStructArray
.
Sourcepub fn try_new(
dtype: ArrowDataType,
length: usize,
values: Vec<Box<dyn MutableArray>>,
validity: Option<MutableBitmap>,
) -> PolarsResult<Self>
pub fn try_new( dtype: ArrowDataType, length: usize, values: Vec<Box<dyn MutableArray>>, validity: Option<MutableBitmap>, ) -> PolarsResult<Self>
Create a MutableStructArray
out of low-end APIs.
§Errors
This function errors iff:
dtype
is notArrowDataType::Struct
- The inner types of
dtype
are not equal to those ofvalues
validity
is notNone
and its length is different from thevalues
’s length
Sourcepub fn into_inner(
self,
) -> (ArrowDataType, usize, Vec<Box<dyn MutableArray>>, Option<MutableBitmap>)
pub fn into_inner( self, ) -> (ArrowDataType, usize, Vec<Box<dyn MutableArray>>, Option<MutableBitmap>)
Extract the low-end APIs from the MutableStructArray
.
Sourcepub fn values(&self) -> &Vec<Box<dyn MutableArray>>
pub fn values(&self) -> &Vec<Box<dyn MutableArray>>
The values
Source§impl 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§
Source§impl Debug for MutableStructArray
impl Debug for MutableStructArray
Source§impl From<MutableStructArray> for StructArray
impl From<MutableStructArray> for StructArray
Source§fn from(other: MutableStructArray) -> Self
fn from(other: MutableStructArray) -> Self
Converts to this type from the input type.
Source§impl MutableArray for MutableStructArray
impl MutableArray for MutableStructArray
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 dtype(&self) -> &ArrowDataType
fn dtype(&self) -> &ArrowDataType
The
ArrowDataType
of the 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.
Auto Trait Implementations§
impl Freeze for MutableStructArray
impl !RefUnwindSafe for MutableStructArray
impl Send for MutableStructArray
impl Sync for MutableStructArray
impl Unpin for MutableStructArray
impl !UnwindSafe for MutableStructArray
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
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> ⓘ
Converts
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> ⓘ
Converts
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