pub struct ListSource {
pub len: Rc<dyn Fn() -> usize>,
pub token_at: Rc<dyn Fn(usize) -> u64>,
pub bind_row: Rc<dyn Fn(usize, RawHandle)>,
pub recycle: Rc<dyn Fn(RawHandle)>,
pub reorder: Option<ListReorder>,
}Expand description
The synchronous row-pull seam for recycling lists (docs/list.md, §10). day-core injects one
per LIST host via Toolkit::attach_list; a recycling backend stores it and calls it from
its native data-source (on the UI thread, outside any day-core borrow). Each closure re-enters
day-core, so — unlike EventSink — these run to completion synchronously (bind_row even
flushes + lays out the row before returning, so the host can measure the cell immediately).
Fields§
§len: Rc<dyn Fn() -> usize>Current row count.
token_at: Rc<dyn Fn(usize) -> u64>Stable identity token for the row at index (for native diffing / animation).
bind_row: Rc<dyn Fn(usize, RawHandle)>Build (first use of this cell) or rebind (recycled cell) row index into the native cell.
recycle: Rc<dyn Fn(RawHandle)>The native cell left the viewport — Day may drop per-cell bookkeeping (optional).
reorder: Option<ListReorder>Drag-to-reorder seam, present when ListProps::reorderable (docs/list.md). None on
non-reorderable lists — backends must not enable their drag machinery without it.
Trait Implementations§
Source§impl Clone for ListSource
impl Clone for ListSource
Source§fn clone(&self) -> ListSource
fn clone(&self) -> ListSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more