pub trait FromSlice<S, E>where
    S: AsRef<[E]>,
{ fn from_slice(slice: S) -> Self; }
Expand description

A trait to define from_slice functions for arrow primitive array types

Required Methods§

source

fn from_slice(slice: S) -> Self

convert a slice of native types into a primitive array (without nulls)

Implementations on Foreign Types§

source§

impl<S, I, OffsetSize> FromSlice<S, I> for GenericByteArray<GenericStringType<OffsetSize>>where
    OffsetSize: OffsetSizeTrait,
    S: AsRef<[I]>,
    I: AsRef<str>,

default implementation for utf8 array types, adapted from From<Vec<_>>

source§

fn from_slice(slice: S) -> GenericByteArray<GenericStringType<OffsetSize>>

source§

impl<S> FromSlice<S, bool> for BooleanArraywhere
    S: AsRef<[bool]>,

default implementation for boolean array type, adapted from From<Vec<bool>>

source§

fn from_slice(slice: S) -> BooleanArray

source§

impl<S, I, OffsetSize> FromSlice<S, I> for GenericByteArray<GenericBinaryType<OffsetSize>>where
    OffsetSize: OffsetSizeTrait,
    S: AsRef<[I]>,
    I: AsRef<[u8]>,

default implementation for binary array types, adapted from From<Vec<_>>

source§

fn from_slice(slice: S) -> GenericByteArray<GenericBinaryType<OffsetSize>>

convert a slice of byte slices into a binary array (without nulls)

implementation details: here the Self::from_vec can be called but not without another copy

source§

impl<S, T> FromSlice<S, <T as ArrowPrimitiveType>::Native> for PrimitiveArray<T>where
    T: ArrowPrimitiveType,
    S: AsRef<[<T as ArrowPrimitiveType>::Native]>,

default implementation for primitive array types, adapted from From<Vec<_>>

source§

fn from_slice(slice: S) -> PrimitiveArray<T>

Implementors§