Struct odbc_api::Bit [−][src]
pub struct Bit(pub u8);
Expand description
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
Trait Implementations
impl CData for Bit
[src]
impl CData for Bit
[src]fn cdata_type(&self) -> CDataType
[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]
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]
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]
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 HasDataType for Bit
[src]
impl HasDataType for Bit
[src]impl Ord for Bit
[src]
impl Ord for Bit
[src]impl PartialOrd<Bit> for Bit
[src]
impl PartialOrd<Bit> for Bit
[src]fn partial_cmp(&self, other: &Bit) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Bit) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Bit
[src]
impl Eq for Bit
[src]
impl InputParameter 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more