embedded_list/
list_source.rs

1
2
3
4
5
6
7
8
use crate::list_item::ListItem;

pub trait ListSource {
    type ListSourceItem: ListItem;

    fn items(&self) -> impl Iterator<Item = Self::ListSourceItem>;
    fn item(&self, index: usize) -> Option<Self::ListSourceItem>;
}