pub unsafe trait Slice {
type Slice<'a>
where Self: 'a;
// Required method
fn slice(&self, valid_rows: usize) -> Self::Slice<'_>;
}Expand description
Access a safe view of the column buffer.
After a fetch operation buffers may only partially be filled with data, the rest of the buffer
may contain uninitialized values. Also we must not permit any operation which would invalidate
the addresses of the buffer. To make reading buffer contents after a fetch safe,
ColumnBuffers implement this trait to offer safe views.
§Safety
Views must not allow access to uninitialized / invalid rows.
Required Associated Types§
Required Methods§
Sourcefn slice(&self, valid_rows: usize) -> Self::Slice<'_>
fn slice(&self, valid_rows: usize) -> Self::Slice<'_>
Num rows may not exceed the actual amount of valid num_rows filled by 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.
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.