odbc_api::buffers

Trait FetchRowMember

Source
pub unsafe trait FetchRowMember: CDataMut + Copy {
    // Required method
    fn indicator(&self) -> Option<Indicator>;

    // Provided methods
    fn find_truncation(&self, buffer_index: usize) -> Option<TruncationInfo> { ... }
    unsafe fn bind_to_col(
        &mut self,
        col_index: u16,
        cursor: &mut StatementRef<'_>,
    ) -> Result<(), Error> { ... }
}
Expand description

Can be used as a member of a FetchRow and bound to a column during row wise fetching.

§Safety

Must only be implemented for types completly representable by consequtive bytes. While members can bind to Variadic types the length of the type buffering them must be known at compile time. E.g. crate::parameter::VarCharArray can also bind to Variadic types but is fixed length at compile time.

Required Methods§

Source

fn indicator(&self) -> Option<Indicator>

Indicator for variable sized or nullable types, None for fixed sized types.

Provided Methods§

Source

fn find_truncation(&self, buffer_index: usize) -> Option<TruncationInfo>

Some if the indicator indicates truncation. Always None for fixed sized types.

Source

unsafe fn bind_to_col( &mut self, col_index: u16, cursor: &mut StatementRef<'_>, ) -> Result<(), Error>

Bind row element to column. Only called for the first row in a row wise buffer.

§Safety

It is the callers responsibility to ensure self lives for the duration of the binding.

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.

Implementations on Foreign Types§

Source§

impl FetchRowMember for f32

Source§

impl FetchRowMember for f64

Source§

impl FetchRowMember for i8

Source§

impl FetchRowMember for i16

Source§

impl FetchRowMember for i32

Source§

impl FetchRowMember for i64

Source§

impl FetchRowMember for u8

Source§

impl FetchRowMember for u16

Source§

impl FetchRowMember for u32

Source§

impl FetchRowMember for u64

Source§

impl FetchRowMember for Date

Source§

impl FetchRowMember for Numeric

Source§

impl FetchRowMember for Time

Source§

impl FetchRowMember for Timestamp

Implementors§

Source§

impl FetchRowMember for Bit

Source§

impl<T> FetchRowMember for Nullable<T>
where T: Pod,

Source§

impl<const LENGTH: usize> FetchRowMember for VarBinaryArray<LENGTH>

Source§

impl<const LENGTH: usize> FetchRowMember for VarCharArray<LENGTH>

Source§

impl<const LENGTH: usize> FetchRowMember for VarWCharArray<LENGTH>