Struct arrow::builder::Builder
[−]
[src]
pub struct Builder<T> where
T: ArrowPrimitiveType, { /* fields omitted */ }
Buffer builder with zero-copy build method
Methods
impl<T> Builder<T> where
T: ArrowPrimitiveType,
[src]
T: ArrowPrimitiveType,
pub fn new() -> Self
[src]
Creates a builder with a default capacity
pub fn with_capacity(capacity: usize) -> Self
[src]
Creates a builder with a fixed capacity
pub fn len(&self) -> usize
[src]
Get the number of elements in the builder
pub fn capacity(&self) -> usize
[src]
Get the capacity of the builder (number of elements)
pub fn slice_mut(&mut self, start: usize, end: usize) -> &mut [T]
[src]
Get the internal byte-aligned memory buffer as a mutable slice
pub fn set_len(&mut self, len: usize)
[src]
Override the length
pub fn push(&mut self, v: T)
[src]
Push a value into the builder, growing the internal buffer as needed
pub fn set(&mut self, i: usize, v: T)
[src]
Set a value at a slot in the allocated memory without adjusting the length
pub fn push_slice(&mut self, slice: &[T])
[src]
push a slice of type T, growing the internal buffer as needed
pub fn reserve(&mut self, n: usize)
[src]
Reserve memory for n elements of type T
pub fn finish(&mut self) -> Buffer<T>
[src]
Build a Buffer from the existing memory
Trait Implementations
impl<T> Drop for Builder<T> where
T: ArrowPrimitiveType,
[src]
T: ArrowPrimitiveType,