pub struct List { /* private fields */ }Expand description
A bordered, rounded container that visually groups a list of ListItems.
The container does not own the items — pass a closure that adds them.
Implementations§
Source§impl List
impl List
Sourcepub fn new(id_source: impl Hash) -> Self
pub fn new(id_source: impl Hash) -> Self
Create a list. id_source is hashed into the inner [ScrollArea]’s id
so multiple Lists on the same page can coexist without colliding.
Sourcepub fn max_height(self, h: f32) -> Self
pub fn max_height(self, h: f32) -> Self
Cap the visible height; the list scrolls when its content exceeds it.
pub fn padding(self, p: f32) -> Self
pub fn show<R>( self, ui: &mut Ui, body: impl FnOnce(&mut Ui) -> R, ) -> InnerResponse<R>
Auto Trait Implementations§
impl Freeze for List
impl RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnsafeUnpin for List
impl UnwindSafe for List
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