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§
Provided Methods§
Sourcefn find_truncation(&self, buffer_index: usize) -> Option<TruncationInfo>
fn find_truncation(&self, buffer_index: usize) -> Option<TruncationInfo>
Some
if the indicator indicates truncation. Always None
for fixed sized types.
Sourceunsafe fn bind_to_col(
&mut self,
col_index: u16,
cursor: &mut StatementRef<'_>,
) -> Result<(), Error>
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.