pub unsafe trait VarKind {
type Element: Copy + Eq;
const ZERO: Self::Element;
const TERMINATING_ZEROES: usize;
const C_DATA_TYPE: CDataType;
// Required method
fn relational_type(buffer_length: usize) -> DataType;
}
Expand description
A tag used to differentiate between different types of variadic buffers.
Safety
Self::TERMINATING_ZEROES
is used to calculate buffer offsets. The number of terminating zeroes is expressed inBufferElement
s.Self::C_DATA_TYPE
is used to bind parameters. Providing wrong values like e.g. a fixed length types, would cause even a correctly implemented odbc driver to access invalid memory.
Required Associated Types§
Required Associated Constants§
sourceconst TERMINATING_ZEROES: usize
const TERMINATING_ZEROES: usize
Number of terminating zeroes required for this kind of variadic buffer.
const C_DATA_TYPE: CDataType
Required Methods§
sourcefn relational_type(buffer_length: usize) -> DataType
fn relational_type(buffer_length: usize) -> DataType
Relational type used to bind the parameter. buffer_length
is specified in elements rather
than bytes, if the two differ.