arrow_array::types

Trait 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 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 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 Methods§

Source

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

Verifies that the provided buffers are valid for this array type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ByteViewType for BinaryViewType

Source§

const IS_UTF8: bool = false

Source§

const PREFIX: &'static str = "Binary"

Source§

type Native = [u8]

Source§

type Owned = Vec<u8>

Source§

impl ByteViewType for StringViewType

Source§

const IS_UTF8: bool = true

Source§

const PREFIX: &'static str = "String"

Source§

type Native = str

Source§

type Owned = String