TableRows

Trait TableRows 

Source
pub trait TableRows {
    type RowKey;
    type Row: Cells<Self::CellKey>;
    type CellKey: CellKey + ?Sized;

    // Required method
    fn rows(&self) -> impl IteratorTrait<Item = &Self::Row>;
}
Expand description

Trait for iterating over rows in a table.

TableRows provides an interface to access all rows in a table, allowing iteration over the data structure.

§Associated Types

  • RowKey: The type used to identify each row.

  • Row: The type representing a row, which must implement Cells for the specified CellKey and CellRepr.

  • CellKey: The type used to identify cells within a row, requiring implementation of the Key trait.

  • CellRepr: The type representing the content of a cell, requiring implementation of the CellRepr trait.

§Required Methods

  • rows(&self) -> impl IteratorTrait<Item = &Self::Row>: Returns an iterator over all rows in the table.

Required Associated Types§

Source

type RowKey

The type used to identify each row.

Source

type Row: Cells<Self::CellKey>

The type representing a row, which must implement Cells for the specified CellKey and CellRepr.

Source

type CellKey: CellKey + ?Sized

The type used to identify cells within a row, requiring implementation of the Key trait.

Required Methods§

Source

fn rows(&self) -> impl IteratorTrait<Item = &Self::Row>

Returns an iterator over all rows of the table.

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<T, RowKey, Row, CellKey> TableRows for AsTable<'_, T, RowKey, Row, CellKey>
where for<'k, 'v> T: Fields<RowKey, &'k Row, Val<'v> = &'v Row> + 'k + 'v, RowKey: RowKey, Row: Cells<CellKey>, CellKey: CellKey + ?Sized,

Source§

type RowKey = RowKey

Source§

type Row = Row

Source§

type CellKey = CellKey