[−][src]Struct tui::widgets::List
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]
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
impl<'a> Clone for List<'a>
[src]
impl<'a> Debug for List<'a>
[src]
impl<'a> StatefulWidget for List<'a>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,