Skip to main content

ArrayVector

Struct ArrayVector 

Source
pub struct ArrayVector<'a> { /* private fields */ }
Expand description

A fixed-size list vector borrowed from a DataChunkHandle.

Exposes a fixed-width list whose child storage is contiguous across all rows.

Implementations§

Source§

impl<'a> ArrayVector<'a>

Source

pub fn logical_type(&self) -> LogicalTypeHandle

Get the logical type of this ArrayVector.

Source

pub fn get_array_size(&self) -> u64

Returns the size of the array type.

Source

pub fn row_is_null(&self, row: u64) -> bool

Returns true if the row at the given index is null.

§Panics

Panics if row is outside the vector capacity.

Source

pub fn try_row_is_null(&self, row: u64) -> Result<bool>

Returns whether the row is null, or an error if it is out of range.

Source

pub fn child(&self, capacity: usize) -> FlatVector<'a>

Returns the child vector. capacity should be a multiple of the array size.

§Panics

Panics if capacity is not a multiple of the fixed array size or exceeds the child allocation derived from the parent capacity.

Source

pub unsafe fn set_child<T: Copy>(&self, data: &[T])

Set primitive data to the child node.

§Panics

Panics if data.len() is not a multiple of the fixed array size.

§Safety

The caller must ensure T matches the child vector’s physical storage and no other references to the same storage exist during the copy. The caller must also ensure the child backing allocation has space for all data elements; nested callers can arrange this by reserving capacity on the parent list vector before taking the array child.

Source

pub fn set_null(&mut self, row: usize)

Set row as null

Auto Trait Implementations§

§

impl<'a> !Send for ArrayVector<'a>

§

impl<'a> !Sync for ArrayVector<'a>

§

impl<'a> Freeze for ArrayVector<'a>

§

impl<'a> RefUnwindSafe for ArrayVector<'a>

§

impl<'a> Unpin for ArrayVector<'a>

§

impl<'a> UnsafeUnpin for ArrayVector<'a>

§

impl<'a> UnwindSafe for ArrayVector<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.