arrow::datatypes

Trait ByteViewType

pub trait ByteViewType:
    Sealed
    + 'static
    + PartialEq
    + Send
    + Sync {
    type Native: ByteArrayNativeType + AsRef<Self::Native> + AsRef<[u8]> + ?Sized;
    type Owned: Debug + Clone + Sync + Send + AsRef<Self::Native>;

    const IS_UTF8: bool;
    const PREFIX: &'static str;
    const DATA_TYPE: DataType = _;

    // Required method
    fn validate(views: &[u128], buffers: &[Buffer]) -> Result<(), ArrowError>;
}
Expand description

A trait over the variable length bytes view array types

Required Associated Constants§

const IS_UTF8: bool

If element in array is utf8 encoded string.

const PREFIX: &'static str

“Binary” or “String”, for use in displayed or error messages

Provided Associated Constants§

const DATA_TYPE: DataType = _

Datatype of array elements

Required Associated Types§

type Native: ByteArrayNativeType + AsRef<Self::Native> + AsRef<[u8]> + ?Sized

Type for representing its equivalent rust type i.e Utf8Array will have native type has &str BinaryArray will have type as u8

type Owned: Debug + Clone + Sync + Send + AsRef<Self::Native>

Type for owned corresponding to Native

Required Methods§

fn validate(views: &[u128], buffers: &[Buffer]) -> Result<(), ArrowError>

Verifies that the provided buffers are valid for this array type

Object Safety§

This trait is not object safe.

Implementors§

§

impl ByteViewType for BinaryViewType

§

const IS_UTF8: bool = false

§

const PREFIX: &'static str = "Binary"

§

type Native = [u8]

§

type Owned = Vec<u8>

§

impl ByteViewType for StringViewType

§

const IS_UTF8: bool = true

§

const PREFIX: &'static str = "String"

§

type Native = str

§

type Owned = String