pub trait Item: Sized + Copy {
const BUFFER_KIND: BufferKind;
fn as_slice(variant: AnyColumnView<'_>) -> Option<&[Self]>;
fn as_nullable_slice(
variant: AnyColumnView<'_>
) -> Option<NullableSlice<'_, Self>>;
fn as_slice_mut(variant: AnyColumnViewMut<'_>) -> Option<&mut [Self]>;
fn as_nullable_slice_mut(
variant: AnyColumnViewMut<'_>
) -> Option<NullableSliceMut<'_, Self>>;
}
Expand description
Can either be extracted as a slice or a NullableSlice
from an AnyColumnView
. This allows
the user to avoid matching on all possibile variants of an AnyColumnView
in case the
buffered type is known at compile time.
Associated Constants
const 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
.
Required methods
fn as_slice(variant: AnyColumnView<'_>) -> Option<&[Self]>
fn as_slice(variant: AnyColumnView<'_>) -> Option<&[Self]>
Extract the array type from an AnyColumnView
.
fn 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
.
fn as_slice_mut(variant: AnyColumnViewMut<'_>) -> Option<&mut [Self]>
fn as_slice_mut(variant: AnyColumnViewMut<'_>) -> Option<&mut [Self]>
Extract the array type from an AnyColumnViewMut
.
fn 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
.