[][src]Struct tui::widgets::List

pub struct List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
{ /* fields omitted */ }

A widget to display several items among which one can be selected (optional)

Examples

let items = ["Item 1", "Item 2", "Item 3"].iter().map(|i| Text::raw(*i));
List::new(items)
    .block(Block::default().title("List").borders(Borders::ALL))
    .style(Style::default().fg(Color::White))
    .highlight_style(Style::default().modifier(Modifier::ITALIC))
    .highlight_symbol(">>");

Implementations

impl<'b, L> List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
[src]

pub fn new(items: L) -> List<'b, L>[src]

pub fn block(self, block: Block<'b>) -> List<'b, L>[src]

pub fn items<I>(self, items: I) -> List<'b, L> where
    I: IntoIterator<Item = Text<'b>, IntoIter = L>, 
[src]

pub fn style(self, style: Style) -> List<'b, L>[src]

pub fn highlight_symbol(self, highlight_symbol: &'b str) -> List<'b, L>[src]

pub fn highlight_style(self, highlight_style: Style) -> List<'b, L>[src]

pub fn start_corner(self, corner: Corner) -> List<'b, L>[src]

Trait Implementations

impl<'b, L: Clone> Clone for List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
[src]

impl<'b, L: Debug> Debug for List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
[src]

impl<'b, L> Default for List<'b, L> where
    L: Iterator<Item = Text<'b>> + Default
[src]

impl<'b, L> StatefulWidget for List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
[src]

type State = ListState

impl<'b, L> Widget for List<'b, L> where
    L: Iterator<Item = Text<'b>>, 
[src]

Auto Trait Implementations

impl<'b, L> RefUnwindSafe for List<'b, L> where
    L: RefUnwindSafe

impl<'b, L> Send for List<'b, L> where
    L: Send

impl<'b, L> Sync for List<'b, L> where
    L: Sync

impl<'b, L> Unpin for List<'b, L> where
    L: Unpin

impl<'b, L> UnwindSafe for List<'b, L> where
    L: UnwindSafe

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.