Struct polars_arrow::builder::PrimitiveArrayBuilder[][src]

pub struct PrimitiveArrayBuilder<T> where
    T: ArrowPrimitiveType,
    T::Native: Default
{ /* fields omitted */ }
Expand description

An arrow primitive builder that is faster than Arrow’s native builder because it uses Rust Vec’s as buffer

Implementations

impl<T> PrimitiveArrayBuilder<T> where
    T: ArrowPrimitiveType,
    T::Native: Default
[src]

pub fn new(capacity: usize) -> Self[src]

pub fn new_no_nulls(capacity: usize) -> Self[src]

pub fn append_value(&mut self, v: T::Native)[src]

Appends a value of type T::Native into the builder

pub fn append_slice(&mut self, other: &[T::Native])[src]

pub fn append_null(&mut self)[src]

Appends a null slot into the builder

pub fn shrink_to_fit(&mut self)[src]

pub fn finish_with_null_buffer(&mut self, buffer: Buffer) -> PrimitiveArray<T>[src]

pub fn finish(&mut self) -> PrimitiveArray<T>[src]

Build the array and reset this Builder

Trait Implementations

impl<T> ArrayBuilder for PrimitiveArrayBuilder<T> where
    T: ArrowPrimitiveType
[src]

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

Returns the number of array slots in the builder

fn is_empty(&self) -> bool[src]

Returns whether number of array slots is zero

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. Read more

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

Returns the builder as a mutable Any reference. Read more

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

Returns the boxed builder as a box of Any.

Auto Trait Implementations

impl<T> RefUnwindSafe for PrimitiveArrayBuilder<T> where
    <T as ArrowPrimitiveType>::Native: RefUnwindSafe

impl<T> Send for PrimitiveArrayBuilder<T>

impl<T> Sync for PrimitiveArrayBuilder<T>

impl<T> Unpin for PrimitiveArrayBuilder<T> where
    <T as ArrowPrimitiveType>::Native: Unpin

impl<T> UnwindSafe for PrimitiveArrayBuilder<T> where
    <T as ArrowPrimitiveType>::Native: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V