pub trait StaticArrayBuilder: Send {
type Array: Array;
// Required methods
fn dtype(&self) -> &ArrowDataType;
fn reserve(&mut self, additional: usize);
fn freeze(self) -> Self::Array;
fn freeze_reset(&mut self) -> Self::Array;
fn len(&self) -> usize;
fn extend_nulls(&mut self, length: usize);
fn subslice_extend(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
share: ShareStrategy,
);
fn subslice_extend_each_repeated(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
);
unsafe fn gather_extend(
&mut self,
other: &Self::Array,
idxs: &[IdxSize],
share: ShareStrategy,
);
fn opt_gather_extend(
&mut self,
other: &Self::Array,
idxs: &[IdxSize],
share: ShareStrategy,
);
// Provided methods
fn extend(&mut self, other: &Self::Array, share: ShareStrategy) { ... }
fn subslice_extend_repeated(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
) { ... }
}
Required Associated Types§
Required Methods§
fn dtype(&self) -> &ArrowDataType
fn reserve(&mut self, additional: usize)
Sourcefn freeze_reset(&mut self) -> Self::Array
fn freeze_reset(&mut self) -> Self::Array
Return the built array and reset to an empty state.
Sourcefn extend_nulls(&mut self, length: usize)
fn extend_nulls(&mut self, length: usize)
Extend this builder with the given number of null elements.
Sourcefn subslice_extend(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
share: ShareStrategy,
)
fn subslice_extend( &mut self, other: &Self::Array, 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.
Sourcefn subslice_extend_each_repeated(
&mut self,
other: &Self::Array,
start: usize,
length: usize,
repeats: usize,
share: ShareStrategy,
)
fn subslice_extend_each_repeated( &mut self, other: &Self::Array, start: usize, length: usize, repeats: usize, share: ShareStrategy, )
The same as subslice_extend, but repeats each element repeats
times.
Sourceunsafe fn gather_extend(
&mut self,
other: &Self::Array,
idxs: &[IdxSize],
share: ShareStrategy,
)
unsafe fn gather_extend( &mut self, other: &Self::Array, 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.
§Safety
The indices must be in-bounds.
Sourcefn opt_gather_extend(
&mut self,
other: &Self::Array,
idxs: &[IdxSize],
share: ShareStrategy,
)
fn opt_gather_extend( &mut self, other: &Self::Array, 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.
Provided Methods§
Sourcefn 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.
Sourcefn 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.