Struct odbc_api::buffers::BufferDescription
source · [−]pub struct BufferDescription {
pub nullable: bool,
pub kind: BufferKind,
}
Expand description
Used to describe a column of a crate::buffers::ColumnarBuffer
.
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: bool
This 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: BufferKind
The type of CData the buffer will be holding.
Implementations
sourceimpl BufferDescription
impl BufferDescription
sourcepub fn bytes_per_row(&self) -> usize
pub fn bytes_per_row(&self) -> usize
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
sourceimpl Clone for BufferDescription
impl Clone for BufferDescription
sourcefn clone(&self) -> BufferDescription
fn clone(&self) -> BufferDescription
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BufferDescription
impl Debug for BufferDescription
impl Copy for BufferDescription
Auto Trait Implementations
impl RefUnwindSafe for BufferDescription
impl Send for BufferDescription
impl Sync for BufferDescription
impl Unpin for BufferDescription
impl UnwindSafe for BufferDescription
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more