Struct odbc_api::buffers::BufferDescription [−][src]
pub struct BufferDescription {
pub nullable: bool,
pub kind: BufferKind,
}Used to describe a column of a crate::buffers::ColumnarRowSet.
While related to to the crate::DataType of the column this is bound to, the Buffer type is
different as it does not describe the type of the data source but the format the data is going
to be represented in memory. While the data source is often considered to choose the buffer type
the kind of processing which is supposed to be applied to the data may be even more important
if choosing the a buffer for the cursor type. I.e. if you intend to print a date to standard out
it may be more reasonable to bind it as Text rather than Date.
Fields
nullable: boolThis indicates whether or not the buffer will be able to represent NULL values. This will cause an indicator buffer to be bound if the selected buffer kind does not already require one anyway.
kind: BufferKindThe type of CData the buffer will be holding.
Implementations
impl BufferDescription[src]
impl BufferDescription[src]pub fn bytes_per_row(&self) -> usize[src]
Returns the element size of such a buffer if bound as a columnar row. Can be used to estimate memory for columnar bindings.
Trait Implementations
impl Clone for BufferDescription[src]
impl Clone for BufferDescription[src]fn clone(&self) -> BufferDescription[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for BufferDescription[src]
impl Copy for BufferDescription[src]Auto Trait Implementations
impl RefUnwindSafe for BufferDescription
impl RefUnwindSafe for BufferDescriptionimpl Send for BufferDescription
impl Send for BufferDescriptionimpl Sync for BufferDescription
impl Sync for BufferDescriptionimpl Unpin for BufferDescription
impl Unpin for BufferDescriptionimpl UnwindSafe for BufferDescription
impl UnwindSafe for BufferDescription