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.
Trait Implementations§
impl Copy for Indicator
impl Eq for Indicator
impl StructuralPartialEq for Indicator
Auto Trait Implementations§
impl Freeze for Indicator
impl RefUnwindSafe for Indicator
impl Send for Indicator
impl Sync for Indicator
impl Unpin for Indicator
impl UnwindSafe for Indicator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more