Trait re_sdk::external::arrow2::array::growable::Growable

pub trait Growable<'a> {
    // Required methods
    fn extend(&mut self, index: usize, start: usize, len: usize);
    fn extend_validity(&mut self, additional: usize);
    fn len(&self) -> usize;
    fn as_box(&mut self) -> Box<dyn Array>;

    // Provided method
    fn as_arc(&mut self) -> Arc<dyn Array> { ... }
}
Expand description

Describes a struct that can be extended from slices of other pre-existing Arrays. This is used in operations where a new array is built out of other arrays, such as filter and concatenation.

Required Methods§

fn extend(&mut self, index: usize, start: usize, len: usize)

Extends this Growable with elements from the bounded Array at index index from a slice starting at start and length len.

§Panic

This function panics if the range is out of bounds, i.e. if start + len >= array.len().

fn extend_validity(&mut self, additional: usize)

Extends this Growable with null elements, disregarding the bound arrays

fn len(&self) -> usize

The current length of the Growable.

fn as_box(&mut self) -> Box<dyn Array>

Converts this Growable to an Box<dyn Array>, thereby finishing the mutation. Self will be empty after such operation

Provided Methods§

fn as_arc(&mut self) -> Arc<dyn Array>

Converts this Growable to an Arc<dyn Array>, thereby finishing the mutation. Self will be empty after such operation.

Implementors§

§

impl<'a> Growable<'a> for GrowableBoolean<'a>

§

impl<'a> Growable<'a> for GrowableFixedSizeBinary<'a>

§

impl<'a> Growable<'a> for GrowableFixedSizeList<'a>

§

impl<'a> Growable<'a> for GrowableMap<'a>

§

impl<'a> Growable<'a> for GrowableNull

§

impl<'a> Growable<'a> for GrowableStruct<'a>

§

impl<'a> Growable<'a> for GrowableUnion<'a>

§

impl<'a, O> Growable<'a> for GrowableBinary<'a, O>
where O: Offset,

§

impl<'a, O> Growable<'a> for GrowableList<'a, O>
where O: Offset,

§

impl<'a, O> Growable<'a> for GrowableUtf8<'a, O>
where O: Offset,

§

impl<'a, T> Growable<'a> for GrowableDictionary<'a, T>
where T: DictionaryKey,

§

impl<'a, T> Growable<'a> for GrowablePrimitive<'a, T>
where T: NativeType,