Struct odbc_api::Nullable[][src]

pub struct Nullable<T> { /* fields omitted */ }
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

impl<T> Nullable<T>[src]

pub fn new(value: T) -> Self[src]

pub fn null() -> Self where
    T: Default
[src]

pub fn as_opt(&self) -> Option<&T>[src]

pub fn into_opt(self) -> Option<T>[src]

Trait Implementations

impl<T> CData for Nullable<T> where
    T: Pod, 
[src]

fn cdata_type(&self) -> CDataType[src]

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

fn indicator_ptr(&self) -> *const isize[src]

Indicates the length of variable sized types. May be zero for fixed sized types.

fn value_ptr(&self) -> *const c_void[src]

Pointer to a value corresponding to the one described by cdata_type.

fn buffer_length(&self) -> isize[src]

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

impl<T> CDataMut for Nullable<T> where
    T: Pod, 
[src]

fn mut_indicator_ptr(&mut self) -> *mut isize[src]

Indicates the length of variable sized types. May be zero for fixed sized types.

fn mut_value_ptr(&mut self) -> *mut c_void[src]

Pointer to a value corresponding to the one described by cdata_type.

impl<T> HasDataType for Nullable<T> where
    T: Pod + HasDataType
[src]

fn data_type(&self) -> DataType[src]

The SQL data as which the parameter is bound to ODBC.

impl<T> InputParameter for Nullable<T> where
    T: Pod + HasDataType
[src]

impl<T> Output for Nullable<T> where
    T: Pod + HasDataType
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.