pub struct List<'a> { /* private fields */ }Expand description
A widget to display a list of items.
Implementations§
Source§impl<'a> List<'a>
impl<'a> List<'a>
Sourcepub fn new(items: impl IntoIterator<Item = impl Into<ListItem<'a>>>) -> Self
pub fn new(items: impl IntoIterator<Item = impl Into<ListItem<'a>>>) -> Self
Create a new list from the given items.
Sourcepub fn highlight_style(self, style: Style) -> Self
pub fn highlight_style(self, style: Style) -> Self
Set the style applied to the selected item.
Sourcepub fn highlight_symbol(self, symbol: &'a str) -> Self
pub fn highlight_symbol(self, symbol: &'a str) -> Self
Set a symbol displayed before the selected item.
Trait Implementations§
Source§impl MeasurableWidget for List<'_>
impl MeasurableWidget for List<'_>
Source§impl<'a> StatefulWidget for List<'a>
impl<'a> StatefulWidget for List<'a>
Auto Trait Implementations§
impl<'a> Freeze for List<'a>
impl<'a> RefUnwindSafe for List<'a>
impl<'a> Send for List<'a>
impl<'a> Sync for List<'a>
impl<'a> Unpin for List<'a>
impl<'a> UnwindSafe for List<'a>
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