A keyed list of items, each shown by row(item), identified by key(item).
Rows keep their node (their text, focus, scroll) while their key stays, even if the list is reordered; a row that has no key in the new list is removed.
Signature
pub const fn each<T, V, F: Fn(&T) -> V>( items: &[T], key: fn(&T) -> u32, row: F, ) -> Each<'_, T, F>Example
use fusuma::{column, each, item};
struct Mail { id: u32, subject: &'static str }
let mails = [Mail { id: 7, subject: "Lunch" }, Mail { id: 9, subject: "Invoice" }];
let view = column((each(&mails, |m| m.id, |m| item(m.subject, false).on_select(m.id)),));
let built = fusuma::doc::built::<u32, _>(&view);
assert_eq!(built.texts(), ["Lunch", "Invoice"]);