pub struct Nullable<T> { /* private fields */ }
Expand description
Wraps a type T together with an additional indicator. This way the type gains a Null representation, those memory layout is compatible with ODBC.
Implementations
Trait Implementations
sourceimpl<T> CData for Nullable<T> where
T: Pod,
impl<T> CData for Nullable<T> where
T: Pod,
sourcefn cdata_type(&self) -> CDataType
fn cdata_type(&self) -> CDataType
The identifier of the C data type of the value buffer. When it is retrieving data from the
data source with fetch
, the driver converts the data to this type. When it sends data to
the source, the driver converts the data from this type. Read more
sourcefn indicator_ptr(&self) -> *const isize
fn indicator_ptr(&self) -> *const isize
Indicates the length of variable sized types. May be zero for fixed sized types. Used to determine the size or existence of input parameters. Read more
sourcefn value_ptr(&self) -> *const c_void
fn value_ptr(&self) -> *const c_void
Pointer to a value corresponding to the one described by cdata_type
.
sourcefn buffer_length(&self) -> isize
fn buffer_length(&self) -> isize
Maximum length of the type in bytes (not characters). It is required to index values in
bound buffers, if more than one parameter is bound. Can be set to zero for types not bound
as parameter arrays, i.e. CStr
. Read more
sourceimpl<T> CDataMut for Nullable<T> where
T: Pod,
impl<T> CDataMut for Nullable<T> where
T: Pod,
sourcefn mut_indicator_ptr(&mut self) -> *mut isize
fn mut_indicator_ptr(&mut self) -> *mut isize
Indicates the length of variable sized types. May be zero for fixed sized types.
sourcefn mut_value_ptr(&mut self) -> *mut c_void
fn mut_value_ptr(&mut self) -> *mut c_void
Pointer to a value corresponding to the one described by cdata_type
.
sourceimpl<T> HasDataType for Nullable<T> where
T: Pod + HasDataType,
impl<T> HasDataType for Nullable<T> where
T: Pod + HasDataType,
impl<T: Copy> Copy for Nullable<T>
impl<T> InputParameter for Nullable<T> where
T: Pod + HasDataType,
impl<T> OutputParameter for Nullable<T> where
T: Pod + HasDataType,
Auto Trait Implementations
impl<T> RefUnwindSafe for Nullable<T> where
T: RefUnwindSafe,
impl<T> Send for Nullable<T> where
T: Send,
impl<T> Sync for Nullable<T> where
T: Sync,
impl<T> Unpin for Nullable<T> where
T: Unpin,
impl<T> UnwindSafe for Nullable<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more