pub struct ScrollListBuilder { /* private fields */ }Expand description
Builder for a ScrollList component.
Required: items (List), render (Lambda), key (Lambda).
Optional: on_reorder (Lambda), dividers (bool).
Implementations§
Source§impl ScrollListBuilder
impl ScrollListBuilder
Sourcepub fn new(items: PropValue, render: PropValue, key: PropValue) -> Self
pub fn new(items: PropValue, render: PropValue, key: PropValue) -> Self
Create a new ScrollListBuilder with required props.
itemsmust be aPropValue::List— the data items to render.rendermust be aPropValue::Lambda— called(item, index) -> Surface.keymust be aPropValue::Lambda— called(item) -> string.
Sourcepub fn on_reorder(self, on_reorder: PropValue) -> Self
pub fn on_reorder(self, on_reorder: PropValue) -> Self
Set the on_reorder callback (Lambda).
pub fn build(self) -> SurfaceNode
Auto Trait Implementations§
impl Freeze for ScrollListBuilder
impl RefUnwindSafe for ScrollListBuilder
impl Send for ScrollListBuilder
impl Sync for ScrollListBuilder
impl Unpin for ScrollListBuilder
impl UnwindSafe for ScrollListBuilder
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