pub struct DynRowView<'a> { /* private fields */ }Expand description
Borrowed dynamic row backed by an arrow_array::RecordBatch.
Implementations§
Source§impl<'a> DynRowView<'a>
impl<'a> DynRowView<'a>
Sourcepub fn get(&self, column: usize) -> Result<Option<DynCellRef<'_>>, DynViewError>
pub fn get(&self, column: usize) -> Result<Option<DynCellRef<'_>>, DynViewError>
Retrieve the cell at column as a borrowed DynCellRef.
Sourcepub fn get_by_name(
&self,
name: &str,
) -> Option<Result<Option<DynCellRef<'_>>, DynViewError>>
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.
Sourcepub fn to_owned(&self) -> Result<DynRow, DynViewError>
pub fn to_owned(&self) -> Result<DynRow, DynViewError>
Clone this row into an owned DynRow, allocating owned dynamic cells for each column.
Sourcepub fn into_raw(self) -> Result<DynRowRaw, DynViewError>
pub fn into_raw(self) -> Result<DynRowRaw, DynViewError>
Consume this row view and capture its values as lifetime-erased DynCellRaw entries.
Sourcepub fn project(
self,
projection: &DynProjection,
) -> Result<DynRowView<'a>, DynViewError>
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.
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more