Trait polars_arrow::pushable::Pushable

source ·
pub trait Pushable<T>: Sized + Default {
    type Freeze;

    // Required methods
    fn reserve(&mut self, additional: usize);
    fn push(&mut self, value: T);
    fn len(&self) -> usize;
    fn push_null(&mut self);
    fn extend_constant(&mut self, additional: usize, value: T);
    fn extend_null_constant(&mut self, additional: usize);
    fn freeze(self) -> Self::Freeze;

    // Provided method
    fn with_capacity(capacity: usize) -> Self { ... }
}
Expand description

A private trait representing structs that can receive elements.

Required Associated Types§

Required Methods§

source

fn reserve(&mut self, additional: usize)

source

fn push(&mut self, value: T)

source

fn len(&self) -> usize

source

fn push_null(&mut self)

source

fn extend_constant(&mut self, additional: usize, value: T)

source

fn extend_null_constant(&mut self, additional: usize)

source

fn freeze(self) -> Self::Freeze

Provided Methods§

source

fn with_capacity(capacity: usize) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Copy + Default> Pushable<T> for Vec<T>

§

type Freeze = Vec<T>

source§

fn reserve(&mut self, additional: usize)

source§

fn len(&self) -> usize

source§

fn push_null(&mut self)

source§

fn push(&mut self, value: T)

source§

fn extend_constant(&mut self, additional: usize, value: T)

source§

fn extend_null_constant(&mut self, additional: usize)

source§

fn freeze(self) -> Self::Freeze

Implementors§