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.
Tuple Fields
0: u8
Implementations
Trait Implementations
sourceimpl CData for Bit
impl CData for Bit
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 HasDataType for Bit
impl HasDataType for Bit
sourceimpl Item for Bit
impl Item for Bit
sourceconst BUFFER_KIND: BufferKind
const BUFFER_KIND: BufferKind
E.g. BufferKind::I64
for i64
. The kind can be used in a buffer description to
instantiate a super::ColumnarBuffer
. Read more
sourcefn as_slice(variant: AnyColumnView<'_>) -> Option<&[Self]>
fn as_slice(variant: AnyColumnView<'_>) -> Option<&[Self]>
Extract the array type from an AnyColumnView
.
sourcefn as_nullable_slice(
variant: AnyColumnView<'_>
) -> Option<NullableSlice<'_, Self>>
fn as_nullable_slice(
variant: AnyColumnView<'_>
) -> Option<NullableSlice<'_, Self>>
Extract the typed nullable buffer from an AnyColumnView
.
sourcefn as_slice_mut(variant: AnyColumnViewMut<'_>) -> Option<&mut [Self]>
fn as_slice_mut(variant: AnyColumnViewMut<'_>) -> Option<&mut [Self]>
Extract the array type from an AnyColumnViewMut
.
sourcefn as_nullable_slice_mut(
variant: AnyColumnViewMut<'_>
) -> Option<NullableSliceMut<'_, Self>>
fn as_nullable_slice_mut(
variant: AnyColumnViewMut<'_>
) -> Option<NullableSliceMut<'_, Self>>
Extract the typed nullable buffer from an AnyColumnViewMut
.
sourceimpl Ord for Bit
impl Ord for Bit
sourceimpl PartialOrd<Bit> for Bit
impl PartialOrd<Bit> for Bit
sourcefn partial_cmp(&self, other: &Bit) -> Option<Ordering>
fn partial_cmp(&self, other: &Bit) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Bit
impl Eq for Bit
impl InputParameter for Bit
impl StableCData for Bit
impl StructuralEq for Bit
impl StructuralPartialEq for Bit
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
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