Trait polars_arrow::array::ViewType

source ·
pub trait ViewType: Sealed + 'static + PartialEq + AsRef<Self> {
    type Owned: Debug + Clone + Sync + Send + AsRef<Self>;

    const IS_UTF8: bool;
    const DATA_TYPE: ArrowDataType;

    // Required methods
    unsafe fn from_bytes_unchecked(slice: &[u8]) -> &Self;
    fn to_bytes(&self) -> &[u8] ;
    fn into_owned(&self) -> Self::Owned;
    fn dtype() -> &'static ArrowDataType;
}

Required Associated Types§

source

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

Required Associated Constants§

Required Methods§

source

unsafe fn from_bytes_unchecked(slice: &[u8]) -> &Self

§Safety

The caller must ensure index < self.len().

source

fn to_bytes(&self) -> &[u8]

source

fn into_owned(&self) -> Self::Owned

source

fn dtype() -> &'static ArrowDataType

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ViewType for str

source§

const IS_UTF8: bool = true

source§

const DATA_TYPE: ArrowDataType = ArrowDataType::Utf8View

§

type Owned = String

source§

unsafe fn from_bytes_unchecked(slice: &[u8]) -> &Self

source§

fn to_bytes(&self) -> &[u8]

source§

fn into_owned(&self) -> Self::Owned

source§

fn dtype() -> &'static ArrowDataType

source§

impl ViewType for [u8]

source§

const IS_UTF8: bool = false

source§

const DATA_TYPE: ArrowDataType = ArrowDataType::BinaryView

§

type Owned = Vec<u8>

source§

unsafe fn from_bytes_unchecked(slice: &[u8]) -> &Self

source§

fn to_bytes(&self) -> &[u8]

source§

fn into_owned(&self) -> Self::Owned

source§

fn dtype() -> &'static ArrowDataType

Implementors§