TableModel

Trait 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

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.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Source§

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,

Source§

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

Source§

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

Source§

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,

Source§

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

Source§

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

Source§

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