Trait patternfly_yew::components::table::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

Object Safety§

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,

§

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

§

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

§

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,

§

type Iterator<'i> = Enumerate<Iter<'i, <MemoizedTableModel<T> as TableDataModel<C>>::Item>>

§

type Item = T

§

type Key = usize

source§

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

§

type Iterator<'i> = Enumerate<Iter<'i, <UseStateTableModel<T> as TableDataModel<C>>::Item>>

§

type Item = T

§

type Key = usize