datatypes::scalars

Trait ScalarVectorBuilder

Source
pub trait ScalarVectorBuilder: MutableVector {
    type VectorType: ScalarVector<Builder = Self>;

    // Required methods
    fn with_capacity(capacity: usize) -> Self;
    fn push(
        &mut self,
        value: Option<<Self::VectorType as ScalarVector>::RefItem<'_>>,
    );
    fn finish(&mut self) -> Self::VectorType;
    fn finish_cloned(&self) -> Self::VectorType;
}
Expand description

A trait over all vector builders.

Required Associated Types§

Source

type VectorType: ScalarVector<Builder = Self>

Required Methods§

Source

fn with_capacity(capacity: usize) -> Self

Create a new builder with initial capacity.

Source

fn push( &mut self, value: Option<<Self::VectorType as ScalarVector>::RefItem<'_>>, )

Push a value into the builder.

Source

fn finish(&mut self) -> Self::VectorType

Build a new vector and reset self.

Source

fn finish_cloned(&self) -> Self::VectorType

Build a new vector without resetting self.

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.

Implementors§