pub struct List<'a> { /* private fields */ }
Expand description
A widget to display several items among which one can be selected (optional)
Examples
let items = [ListItem::new("Item 1"), ListItem::new("Item 2"), ListItem::new("Item 3")];
List::new(items)
.block(Block::default().title("List").borders(Borders::ALL))
.style(Style::default().fg(Color::White))
.highlight_style(Style::default().add_modifier(Modifier::ITALIC))
.highlight_symbol(">>");
Implementations
sourceimpl<'a> List<'a>
impl<'a> List<'a>
pub fn new<T>(items: T) -> List<'a> where
T: Into<Vec<ListItem<'a>>>,
pub fn block(self, block: Block<'a>) -> List<'a>
pub fn style(self, style: Style) -> List<'a>
pub fn highlight_symbol(self, highlight_symbol: &'a str) -> List<'a>
pub fn highlight_style(self, style: Style) -> List<'a>
pub fn repeat_highlight_symbol(self, repeat: bool) -> List<'a>
pub fn start_corner(self, corner: Corner) -> List<'a>
Trait Implementations
sourceimpl<'a> StatefulWidget for List<'a>
impl<'a> StatefulWidget for List<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more