[][src]Struct tui_temp_fork::widgets::SelectableList

pub struct SelectableList<'b> { /* fields omitted */ }

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

Examples

SelectableList::default()
    .block(Block::default().title("SelectableList").borders(Borders::ALL))
    .items(&["Item 1", "Item 2", "Item 3"])
    .select(Some(1))
    .style(Style::default().fg(Color::White))
    .highlight_style(Style::default().modifier(Modifier::ITALIC))
    .highlight_symbol(">>");

Methods

impl<'b> SelectableList<'b>[src]

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

pub fn items<I>(self, items: &'b [I]) -> SelectableList<'b> where
    I: AsRef<str> + 'b, 
[src]

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

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

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

pub fn select(self, index: Option<usize>) -> SelectableList<'b>[src]

Trait Implementations

impl<'b> Widget for SelectableList<'b>[src]

impl<'b> Default for SelectableList<'b>[src]

Auto Trait Implementations

impl<'b> Send for SelectableList<'b>

impl<'b> Sync for SelectableList<'b>

impl<'b> Unpin for SelectableList<'b>

impl<'b> UnwindSafe for SelectableList<'b>

impl<'b> RefUnwindSafe for SelectableList<'b>

Blanket Implementations

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

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

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.

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

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

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