Trait patternfly_yew::components::table::TableModel

source ·
pub trait TableModel<C>
where C: Clone + Eq + 'static,
{ type Iterator<'i>: Iterator<Item = TableModelEntry<'i, Self::Item, Self::Key, C>> where Self: 'i; type Item: TableEntryRenderer<C> + Clone + 'static; type Key: Into<Key> + Clone + Debug + Eq + 'static; // Required methods fn len(&self) -> usize; fn iter(&self) -> Self::Iterator<'_>; // Provided method fn is_empty(&self) -> bool { ... } }
Expand description

A model providing data for a table.

Required Associated Types§

source

type Iterator<'i>: Iterator<Item = TableModelEntry<'i, Self::Item, Self::Key, C>> where Self: 'i

source

type Item: TableEntryRenderer<C> + Clone + 'static

source

type Key: Into<Key> + Clone + Debug + Eq + 'static

Required Methods§

source

fn len(&self) -> usize

Get the number of items

source

fn iter(&self) -> Self::Iterator<'_>

Iterate over all the items

Provided Methods§

source

fn is_empty(&self) -> bool

Test if the table model is empty

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<C, M> TableModel<C> for Rc<M>
where C: Clone + Eq + 'static, M: TableModel<C> + 'static,

§

type Iterator<'i> = <M as TableModel<C>>::Iterator<'i>

§

type Item = <M as TableModel<C>>::Item

§

type Key = <M as TableModel<C>>::Key

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn iter(&self) -> Self::Iterator<'_>

Implementors§

source§

impl<C, M> TableModel<C> for StateModel<C, M>
where C: Clone + Eq + 'static, M: TableDataModel<C> + 'static, M::Key: Hash,

§

type Iterator<'i> = StateModelIter<'i, <StateModel<C, M> as TableModel<C>>::Key, <StateModel<C, M> as TableModel<C>>::Item, C>

§

type Item = <M as TableDataModel<C>>::Item

§

type Key = <M as TableDataModel<C>>::Key

source§

impl<C, M> TableModel<C> for UseTableData<C, M>
where C: Clone + Eq + 'static, M: PartialEq + Clone + TableDataModel<C> + 'static, M::Key: Hash,

§

type Iterator<'i> = StateModelIter<'i, <M as TableDataModel<C>>::Key, <M as TableDataModel<C>>::Item, C>

§

type Item = <M as TableDataModel<C>>::Item

§

type Key = <M as TableDataModel<C>>::Key