Type Alias arrow_array::array::BinaryViewArray

source ·
pub type BinaryViewArray = GenericByteViewArray<BinaryViewType>;
Expand description

A GenericByteViewArray of [u8]

§Example

use arrow_array::BinaryViewArray;
let array = BinaryViewArray::from_iter_values(vec![b"hello" as &[u8], b"world", b"lulu", b"large payload over 12 bytes"]);
assert_eq!(array.value(0), b"hello");
assert_eq!(array.value(3), b"large payload over 12 bytes");

Aliased Type§

struct BinaryViewArray { /* private fields */ }

Implementations§

source§

impl BinaryViewArray

source

pub fn to_string_view(self) -> Result<StringViewArray, ArrowError>

Convert the BinaryViewArray to StringViewArray If items not utf8 data, validate will fail and error returned.

source

pub unsafe fn to_string_view_unchecked(self) -> StringViewArray

Convert the BinaryViewArray to StringViewArray

§Safety

Caller is responsible for ensuring that items in array are utf8 data.

Trait Implementations§

source§

impl From<Vec<&[u8]>> for BinaryViewArray

source§

fn from(v: Vec<&[u8]>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Option<&[u8]>>> for BinaryViewArray

source§

fn from(v: Vec<Option<&[u8]>>) -> Self

Converts to this type from the input type.