Struct odbc_api::Bit[][src]

pub struct Bit(pub u8);

New type wrapping u8 and binding as SQL_BIT.

If rust would guarantee the representation of bool to be an u8, bool would be the obvious choice instead. Alas it is not and someday on some platform bool might be something else than a u8 so let’s use this new type instead.

Implementations

impl Bit[src]

pub fn as_bool(self) -> bool[src]

Maps 1 to true, 0 to false. Panics if Bit should be invalid (not 0 or 1).

Trait Implementations

impl CData for Bit[src]

impl Clone for Bit[src]

impl Copy for Bit[src]

impl Debug for Bit[src]

impl Default for Bit[src]

impl Eq for Bit[src]

impl HasDataType for Bit[src]

impl InputParameter for Bit[src]

impl Ord for Bit[src]

impl PartialEq<Bit> for Bit[src]

impl PartialOrd<Bit> for Bit[src]

impl StructuralEq for Bit[src]

impl StructuralPartialEq for Bit[src]

Auto Trait Implementations

impl RefUnwindSafe for Bit

impl Send for Bit

impl Sync for Bit

impl Unpin for Bit

impl UnwindSafe for Bit

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.