ColumnBuffer

Trait ColumnBuffer 

Source
pub unsafe trait ColumnBuffer: for<'a> ColumnProjections<'a> + CDataMut {
    // Required methods
    fn view(&self, valid_rows: usize) -> Self::View;
    fn fill_default(&mut self, from: usize, to: usize);
    fn capacity(&self) -> usize;
}
Expand description

A buffer for a single column intended to be used together with ColumnarBuffer.

§Safety

Views must not allow access to unintialized / invalid rows.

Required Methods§

Source

fn view(&self, valid_rows: usize) -> Self::View

Num rows may not exceed the actually amount of valid num_rows filled be the ODBC API. The column buffer does not know how many elements were in the last row group, and therefore can not guarantee the accessed element to be valid and in a defined state. It also can not panic on accessing an undefined element.

Source

fn fill_default(&mut self, from: usize, to: usize)

Fills the column with the default representation of values, between from and to index.

Source

fn capacity(&self) -> usize

Current capacity of the column

Implementations on Foreign Types§

Source§

impl<T> ColumnBuffer for Vec<T>
where T: Pod,

Source§

fn view(&self, valid_rows: usize) -> &[T]

Source§

fn fill_default(&mut self, from: usize, to: usize)

Source§

fn capacity(&self) -> usize

Implementors§