DynRowView

Struct DynRowView 

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

Borrowed dynamic row backed by an arrow_array::RecordBatch.

Implementations§

Source§

impl<'a> DynRowView<'a>

Source

pub fn len(&self) -> usize

Number of columns in this row.

Source

pub fn is_empty(&self) -> bool

Returns true when the row has zero columns.

Source

pub fn fields(&self) -> &Fields

Borrow the schema fields.

Source

pub fn get(&self, column: usize) -> Result<Option<DynCellRef<'_>>, DynViewError>

Retrieve the cell at column as a borrowed DynCellRef.

Source

pub fn get_by_name( &self, name: &str, ) -> Option<Result<Option<DynCellRef<'_>>, DynViewError>>

Retrieve a column by name, returning None if the field does not exist.

Source

pub fn to_owned(&self) -> Result<DynRow, DynViewError>

Clone this row into an owned DynRow, allocating owned dynamic cells for each column.

Source

pub fn into_raw(self) -> Result<DynRowRaw, DynViewError>

Consume this row view and capture its values as lifetime-erased DynCellRaw entries.

Source

pub fn project( self, projection: &DynProjection, ) -> Result<DynRowView<'a>, DynViewError>

Apply a projection to this view, yielding a new view that references only the mapped columns.

The projection is lazy and reuses the underlying batch buffers.

§Errors

Returns DynViewError::Invalid if the projection was derived from a schema whose width differs from the underlying batch.

Source

pub fn row_index(&self) -> usize

Access the underlying row index.

Trait Implementations§

Source§

impl<'a> Debug for DynRowView<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DynRowView<'a>

§

impl<'a> !RefUnwindSafe for DynRowView<'a>

§

impl<'a> Send for DynRowView<'a>

§

impl<'a> Sync for DynRowView<'a>

§

impl<'a> Unpin for DynRowView<'a>

§

impl<'a> !UnwindSafe for DynRowView<'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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.