Struct tui::widgets::List [−][src]
pub struct List<'a> { /* fields omitted */ }
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
impl<'a> List<'a>
[src]
impl<'a> List<'a>
[src]pub fn new<T>(items: T) -> List<'a> where
T: Into<Vec<ListItem<'a>>>,
[src]
T: Into<Vec<ListItem<'a>>>,
pub fn block(self, block: Block<'a>) -> List<'a>
[src]
pub fn style(self, style: Style) -> List<'a>
[src]
pub fn highlight_symbol(self, highlight_symbol: &'a str) -> List<'a>
[src]
pub fn highlight_style(self, style: Style) -> List<'a>
[src]
pub fn start_corner(self, corner: Corner) -> List<'a>
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for List<'a>
impl<'a> RefUnwindSafe for List<'a>
impl<'a> UnwindSafe for List<'a>
impl<'a> UnwindSafe for List<'a>