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]

pub fn new<T>(items: T) -> List<'a> where
    T: Into<Vec<ListItem<'a>>>, 
[src]

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

impl<'a> Clone for List<'a>[src]

impl<'a> Debug for List<'a>[src]

impl<'a> StatefulWidget for List<'a>[src]

type State = ListState

impl<'a> Widget for List<'a>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.