TableDataModel

Trait TableDataModel 

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

Required Associated Types§

Source

type Iterator<'i>: Iterator<Item = (Self::Key, &'i Self::Item)> 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 contains(&self, key: &Self::Key) -> bool

Test if the model contains the key

Source

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

Iterate over all the items

Provided Methods§

Source

fn is_empty(&self) -> bool

Test if the 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> TableDataModel<C> for Rc<M>
where C: Clone + Eq + 'static, M: TableDataModel<C> + 'static,

Source§

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

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn contains(&self, key: &Self::Key) -> bool

Source§

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

Implementors§

Source§

impl<C, T> TableDataModel<C> for MemoizedTableModel<T>
where C: Clone + Eq + 'static, T: TableEntryRenderer<C> + Clone + 'static,

Source§

impl<C, T> TableDataModel<C> for UseStateTableModel<T>
where C: Clone + Eq + 'static, T: PartialEq + TableEntryRenderer<C> + Clone + 'static,