Enum odbc_api::buffers::AnyColumnView
source · [−]pub enum AnyColumnView<'a> {
Show 25 variants
Text(TextColumnView<'a, u8>),
WText(TextColumnView<'a, u16>),
Binary(BinColumnView<'a>),
Date(&'a [Date]),
Time(&'a [Time]),
Timestamp(&'a [Timestamp]),
F64(&'a [f64]),
F32(&'a [f32]),
I8(&'a [i8]),
I16(&'a [i16]),
I32(&'a [i32]),
I64(&'a [i64]),
U8(&'a [u8]),
Bit(&'a [Bit]),
NullableDate(NullableSlice<'a, Date>),
NullableTime(NullableSlice<'a, Time>),
NullableTimestamp(NullableSlice<'a, Timestamp>),
NullableF64(NullableSlice<'a, f64>),
NullableF32(NullableSlice<'a, f32>),
NullableI8(NullableSlice<'a, i8>),
NullableI16(NullableSlice<'a, i16>),
NullableI32(NullableSlice<'a, i32>),
NullableI64(NullableSlice<'a, i64>),
NullableU8(NullableSlice<'a, u8>),
NullableBit(NullableSlice<'a, Bit>),
}
Expand description
A borrowed view on the valid rows in a column of a crate::buffers::ColumnarBuffer
.
For columns of fixed size types, which are guaranteed to not contain null, a direct access to the slice is offered. Buffers over nullable columns can be accessed via an iterator over options.
Variants
Text(TextColumnView<'a, u8>)
Nullable character data in the system encoding.
WText(TextColumnView<'a, u16>)
Nullable character data encoded in UTF-16.
Binary(BinColumnView<'a>)
Date(&'a [Date])
Time(&'a [Time])
Timestamp(&'a [Timestamp])
F64(&'a [f64])
F32(&'a [f32])
I8(&'a [i8])
I16(&'a [i16])
I32(&'a [i32])
I64(&'a [i64])
U8(&'a [u8])
Bit(&'a [Bit])
NullableDate(NullableSlice<'a, Date>)
NullableTime(NullableSlice<'a, Time>)
NullableTimestamp(NullableSlice<'a, Timestamp>)
NullableF64(NullableSlice<'a, f64>)
NullableF32(NullableSlice<'a, f32>)
NullableI8(NullableSlice<'a, i8>)
NullableI16(NullableSlice<'a, i16>)
NullableI32(NullableSlice<'a, i32>)
NullableI64(NullableSlice<'a, i64>)
NullableU8(NullableSlice<'a, u8>)
NullableBit(NullableSlice<'a, Bit>)
Implementations
sourceimpl<'a> AnyColumnView<'a>
impl<'a> AnyColumnView<'a>
sourcepub fn as_text_view(self) -> Option<TextColumnView<'a, u8>>
pub fn as_text_view(self) -> Option<TextColumnView<'a, u8>>
This method is useful if you expect the variant to be AnyColumnView::Text
. It allows you
to unwrap the inner column view without explictly matching it.
sourcepub fn as_w_text_view(self) -> Option<TextColumnView<'a, u16>>
pub fn as_w_text_view(self) -> Option<TextColumnView<'a, u16>>
This method is useful if you expect the variant to be AnyColumnView::WText
. It allows
you to unwrap the inner column view without explictly matching it.
sourcepub fn as_bin_view(self) -> Option<BinColumnView<'a>>
pub fn as_bin_view(self) -> Option<BinColumnView<'a>>
This method is useful if you expect the variant to be AnyColumnView::Binary
. It allows
you to unwrap the inner column view without explictly matching it.
sourcepub fn as_slice<I: Item>(self) -> Option<&'a [I]>
pub fn as_slice<I: Item>(self) -> Option<&'a [I]>
Extract the array type from an AnyColumnView
.
sourcepub fn as_nullable_slice<I: Item>(self) -> Option<NullableSlice<'a, I>>
pub fn as_nullable_slice<I: Item>(self) -> Option<NullableSlice<'a, I>>
Extract the typed nullable buffer from an AnyColumnView
.
Trait Implementations
sourceimpl<'a> Clone for AnyColumnView<'a>
impl<'a> Clone for AnyColumnView<'a>
sourcefn clone(&self) -> AnyColumnView<'a>
fn clone(&self) -> AnyColumnView<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for AnyColumnView<'a>
impl<'a> Debug for AnyColumnView<'a>
impl<'a> Copy for AnyColumnView<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for AnyColumnView<'a>
impl<'a> Send for AnyColumnView<'a>
impl<'a> Sync for AnyColumnView<'a>
impl<'a> Unpin for AnyColumnView<'a>
impl<'a> UnwindSafe for AnyColumnView<'a>
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