pub struct StructArrayBuilder { /* private fields */ }Implementations§
Source§impl StructArrayBuilder
impl StructArrayBuilder
pub fn new( dtype: ArrowDataType, inner_builders: Vec<Box<dyn ArrayBuilder>>, ) -> Self
Trait Implementations§
Source§impl StaticArrayBuilder for StructArrayBuilder
impl StaticArrayBuilder for StructArrayBuilder
type Array = StructArray
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Source§fn freeze(self) -> StructArray
fn freeze(self) -> StructArray
Consume this builder returning the built array.
Source§fn freeze_reset(&mut self) -> Self::Array
fn freeze_reset(&mut self) -> Self::Array
Return the built array and reset to an empty state.
Source§fn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Source§fn subslice_extend(
&mut self,
other: &StructArray,
start: usize,
length: usize,
share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &StructArray, start: usize, length: usize, share: ShareStrategy, )
Extends this builder with the contents of the given array subslice. May
panic if other does not match the dtype of this array.
Source§fn subslice_extend_each_repeated(
&mut self,
other: &StructArray,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_each_repeated( &mut self, other: &StructArray, start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats each element
repeats times.Source§unsafe fn gather_extend(
&mut self,
other: &StructArray,
idxs: &[IdxSize],
share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &StructArray, idxs: &[IdxSize], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]] is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Read moreSource§fn opt_gather_extend(
&mut self,
other: &StructArray,
idxs: &[IdxSize],
share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &StructArray, idxs: &[IdxSize], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]] is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Out-of-bounds indices are mapped to nulls.Source§fn extend(&mut self, other: &Self::Array, share: ShareStrategy)
fn extend(&mut self, other: &Self::Array, share: ShareStrategy)
Extends this builder with the contents of the given array. May panic if
other does not match the dtype of this array.
Source§fn subslice_extend_repeated(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_repeated( &mut self, other: &Self::Array, start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats the extension
repeats times.Auto Trait Implementations§
impl Freeze for StructArrayBuilder
impl !RefUnwindSafe for StructArrayBuilder
impl Send for StructArrayBuilder
impl !Sync for StructArrayBuilder
impl Unpin for StructArrayBuilder
impl !UnwindSafe for StructArrayBuilder
Blanket Implementations§
Source§impl<T> ArrayBuilder for Twhere
T: StaticArrayBuilder,
impl<T> ArrayBuilder for Twhere
T: StaticArrayBuilder,
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Source§fn freeze_reset(&mut self) -> Box<dyn Array>
fn freeze_reset(&mut self) -> Box<dyn Array>
Return the built array and reset to an empty state.
Source§fn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Source§fn subslice_extend(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, share: ShareStrategy, )
Extends this builder with the contents of the given array subslice. May
panic if other does not match the dtype of this array.
Source§fn subslice_extend_repeated(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_repeated( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats the extension
repeats times.Source§fn subslice_extend_each_repeated(
&mut self,
other: &(dyn Array + 'static),
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_each_repeated( &mut self, other: &(dyn Array + 'static), start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats each element
repeats times.Source§unsafe fn gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]] is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Read moreSource§fn opt_gather_extend(
&mut self,
other: &(dyn Array + 'static),
idxs: &[u32],
share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &(dyn Array + 'static), idxs: &[u32], share: ShareStrategy, )
Extends this builder with the contents of the given array at the given
indices. That is,
other[idxs[i]] is appended to this array in order,
for each i=0..idxs.len(). May panic if other does not match the
dtype of this array. Out-of-bounds indices are mapped to nulls.Source§fn extend(&mut self, other: &dyn Array, share: ShareStrategy)
fn extend(&mut self, other: &dyn Array, share: ShareStrategy)
Extends this builder with the contents of the given array. May panic if
other does not match the dtype of this array.
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