Trait arrow::datatypes::ByteViewType

source ·
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 Types§

source

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

source

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

Type for owned corresponding to Native

Required Associated Constants§

source

const IS_UTF8: bool

If element in array is utf8 encoded string.

source

const PREFIX: &'static str

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

Provided Associated Constants§

source

const DATA_TYPE: DataType = _

Datatype of array elements

Required Methods§

source

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§

source§

impl ByteViewType for BinaryViewType

source§

const IS_UTF8: bool = false

source§

const PREFIX: &'static str = "Binary"

§

type Native = [u8]

§

type Owned = Vec<u8>

source§

impl ByteViewType for StringViewType

source§

const IS_UTF8: bool = true

source§

const PREFIX: &'static str = "String"

§

type Native = str

§

type Owned = String