[][src]Trait arrow::array::ArrayBuilder

pub trait ArrayBuilder: Any {
    fn len(&self) -> usize;
fn finish(&mut self) -> ArrayRef;
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn into_box_any(self: Box<Self>) -> Box<dyn Any>; }

Trait for dealing with different array builders at runtime

Required methods

fn len(&self) -> usize

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef

Builds the array

fn as_any(&self) -> &dyn Any

Returns the builder as a non-mutable Any reference.

This is most useful when one wants to call non-mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_ref to get a reference on the specific builder.

fn as_any_mut(&mut self) -> &mut dyn Any

Returns the builder as a mutable Any reference.

This is most useful when one wants to call mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_mut to get a reference on the specific builder.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>

Returns the boxed builder as a box of Any.

Loading content...

Implementors

impl ArrayBuilder for BinaryBuilder[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

impl ArrayBuilder for FixedSizeBinaryBuilder[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

impl ArrayBuilder for StringBuilder[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

impl ArrayBuilder for StructBuilder[src]

fn len(&self) -> usize[src]

Returns the number of array slots in the builder.

Note that this always return the first child field builder's length, and it is the caller's responsibility to maintain the consistency that all the child field builder should have the equal number of elements.

fn finish(&mut self) -> ArrayRef[src]

Builds the array.

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

This is most useful when one wants to call non-mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_ref to get a reference on the specific builder.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

This is most useful when one wants to call mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_mut to get a reference on the specific builder.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

impl<T: ArrayBuilder> ArrayBuilder for FixedSizeListBuilder<T> where
    T: 'static, 
[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

impl<T: ArrayBuilder> ArrayBuilder for ListBuilder<T> where
    T: 'static, 
[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

impl<T: ArrowPrimitiveType> ArrayBuilder for PrimitiveBuilder<T>[src]

fn as_any(&self) -> &dyn Any[src]

Returns the builder as a non-mutable Any reference.

fn as_any_mut(&mut self) -> &mut dyn Any[src]

Returns the builder as a mutable Any reference.

fn into_box_any(self: Box<Self>) -> Box<dyn Any>[src]

Returns the boxed builder as a box of Any.

fn len(&self) -> usize[src]

Returns the number of array slots in the builder

fn finish(&mut self) -> ArrayRef[src]

Builds the array and reset this builder.

Loading content...