Trait odbc_api::buffers::Item

source ·
pub trait Item: Sized + Copy {
    const BUFFER_KIND: BufferKind;

    fn buffer_desc(nullable: bool) -> BufferDesc;
    fn as_slice(variant: AnySlice<'_>) -> Option<&[Self]>;
    fn as_nullable_slice(
        variant: AnySlice<'_>
    ) -> Option<NullableSlice<'_, Self>>; fn as_slice_mut(variant: AnySliceMut<'_>) -> Option<&mut [Self]>; fn as_nullable_slice_mut(
        variant: AnySliceMut<'_>
    ) -> Option<NullableSliceMut<'_, Self>>; }
Expand description

Can either be extracted as a slice or a NullableSlice from an AnySlice. This allows the user to avoid matching on all possibile variants of an AnySlice in case the buffered type is known at compile time.

Required Associated Constants§

👎Deprecated: Use associated method buffer_desc instead.

E.g. BufferKind::I64 for i64. The kind can be used in a buffer description to instantiate a super::ColumnarBuffer.

Required Methods§

Can be used to instantiate a super::ColumnarBuffer.

Extract the array type from an AnySlice.

Extract the typed nullable buffer from an AnySlice.

Extract the array type from an AnySliceMut.

Extract the typed nullable buffer from an AnySliceMut.

Implementations on Foreign Types§

👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.
👎Deprecated: Use associated method buffer_desc instead.

Implementors§