polars_arrow::pushable

Trait 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 methods
    fn with_capacity(capacity: usize) -> Self { ... }
    fn extend_n(&mut self, n: usize, iter: impl Iterator<Item = T>) { ... }
}
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

Source

fn extend_n(&mut self, n: usize, iter: impl Iterator<Item = T>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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_n(&mut self, n: usize, iter: impl Iterator<Item = 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§