ella_common::row

Trait RowFormatView

Source
pub trait RowFormatView<R>:
    Debug
    + IntoIterator<Item = R, IntoIter = RowViewIter<R, Self>>
    + Clone
    + 'static {
    // Required methods
    fn len(&self) -> usize;
    fn row(&self, i: usize) -> R;
    unsafe fn row_unchecked(&self, i: usize) -> R;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn iter(&self) -> RowViewIter<R, Self>  { ... }
}
Expand description

Wrapper around Arrow data that implements typed indexing by row.

Required Methods§

Source

fn len(&self) -> usize

Returns the number of wrapped rows.

Source

fn row(&self, i: usize) -> R

Returns the ith row.

Panics if i >= len.

Source

unsafe fn row_unchecked(&self, i: usize) -> R

Returns the ith row without bounds checking.

§Safety

Implementations must return a valid result when i < len. Calling this method where i >= len is undefined behavior.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the view contains 0 rows.

Source

fn iter(&self) -> RowViewIter<R, Self>

Returns an iterator over the rows in this view.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RowFormatView<()> for TupleView<(), ()>

Source§

impl<R: RowFormat> RowFormatView<Row<R>> for RowView<R>

Source§

impl<T1> RowFormatView<(T1,)> for TupleView<(T1,), (T1::View,)>
where T1: RowFormat,

Source§

impl<T1, T2> RowFormatView<(T1, T2)> for TupleView<(T1, T2), (T1::View, T2::View)>
where T1: RowFormat, T2: RowFormat,

Source§

impl<T1, T2, T3> RowFormatView<(T1, T2, T3)> for TupleView<(T1, T2, T3), (T1::View, T2::View, T3::View)>
where T1: RowFormat, T2: RowFormat, T3: RowFormat,

Source§

impl<T1, T2, T3, T4> RowFormatView<(T1, T2, T3, T4)> for TupleView<(T1, T2, T3, T4), (T1::View, T2::View, T3::View, T4::View)>
where T1: RowFormat, T2: RowFormat, T3: RowFormat, T4: RowFormat,

Source§

impl<T1, T2, T3, T4, T5> RowFormatView<(T1, T2, T3, T4, T5)> for TupleView<(T1, T2, T3, T4, T5), (T1::View, T2::View, T3::View, T4::View, T5::View)>
where T1: RowFormat, T2: RowFormat, T3: RowFormat, T4: RowFormat, T5: RowFormat,

Source§

impl<T1, T2, T3, T4, T5, T6> RowFormatView<(T1, T2, T3, T4, T5, T6)> for TupleView<(T1, T2, T3, T4, T5, T6), (T1::View, T2::View, T3::View, T4::View, T5::View, T6::View)>
where T1: RowFormat, T2: RowFormat, T3: RowFormat, T4: RowFormat, T5: RowFormat, T6: RowFormat,

Source§

impl<T: TensorValue> RowFormatView<T> for ScalarRowView<T>

Source§

impl<T: RowFormat, const N: usize> RowFormatView<[T; N]> for ArrayRowView<[T; N], T::View, N>