pub struct Repeater<Model: ListModel, State> { /* private fields */ }Expand description
Scene and binding caches scoped to each position in a generated repeat.
Implementations§
Source§impl<Model: ListModel, State: Default> Repeater<Model, State>
impl<Model: ListModel, State: Default> Repeater<Model, State>
pub fn resolve_model(&self, model: impl FnOnce() -> Model) -> Rc<Model>
pub fn with_model<R>( &self, model: impl FnOnce() -> Model, read: impl FnOnce(&Model) -> R, ) -> R
pub fn row_count(&self, model: impl FnOnce() -> Model) -> usize
pub fn render( &self, model: impl Fn() -> Model, render_row: impl Fn(usize, &dyn Fn() -> Model::Item, &State) -> Node, ) -> Node
pub fn render_range( &self, model: impl Fn() -> Model, range: Range<usize>, render_row: impl Fn(usize, &dyn Fn() -> Model::Item, &State) -> Node, ) -> Vec<Node>
pub fn render_indices( &self, model: impl Fn() -> Model, indices: impl IntoIterator<Item = usize>, render_row: impl Fn(usize, &dyn Fn() -> Model::Item, &State) -> Node, ) -> Vec<Node>
Trait Implementations§
Auto Trait Implementations§
impl<Model, State> !Freeze for Repeater<Model, State>
impl<Model, State> !RefUnwindSafe for Repeater<Model, State>
impl<Model, State> !Send for Repeater<Model, State>
impl<Model, State> !Sync for Repeater<Model, State>
impl<Model, State> !UnwindSafe for Repeater<Model, State>
impl<Model, State> Forget for Repeater<Model, State>
impl<Model, State> Move for Repeater<Model, State>
impl<Model, State> Unpin for Repeater<Model, State>
impl<Model, State> UnsafeUnpin for Repeater<Model, State>where
RefCell<BTreeMap<usize, Rc<Row<Model, State>>>>: UnsafeUnpin,
Property<Rc<Model>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more