pub enum Indicator {
Null,
NoTotal,
Length(usize),
}
Expand description
Indicates existence and length of a value.
Variants§
Null
Field does not exist
NoTotal
Field exists, but its length had not be reported by the driver.
Length(usize)
Fields exists. Value indicates number of bytes required to store the value. In case of truncated data, this is the true length of the data, before truncation occurred.
Implementations§
source§impl Indicator
impl Indicator
sourcepub fn from_isize(indicator: isize) -> Self
pub fn from_isize(indicator: isize) -> Self
Creates an indicator from an isize
indicator value returned by ODBC. Users of this crate
have likely no need to call this method.
sourcepub fn is_truncated(self, length_in_buffer: usize) -> bool
pub fn is_truncated(self, length_in_buffer: usize) -> bool
Does this indicator imply truncation for a value of the given length?
length_in_buffer
is specified in bytes without terminating zeroes.
sourcepub fn is_null(self) -> bool
pub fn is_null(self) -> bool
Only true
if the indicator is the equivalent to odbc_sys::NULL_DATA
, indicating a
non-existing value.