[−][src]Struct tui::widgets::List
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]
L: Iterator<Item = Text<'b>>,
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]
I: IntoIterator<Item = Text<'b>, IntoIter = L>,
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]
L: Iterator<Item = Text<'b>>,
impl<'b, L: Debug> Debug for List<'b, L> where
L: Iterator<Item = Text<'b>>,
[src]
L: Iterator<Item = Text<'b>>,
impl<'b, L> Default for List<'b, L> where
L: Iterator<Item = Text<'b>> + Default,
[src]
L: Iterator<Item = Text<'b>> + Default,
impl<'b, L> StatefulWidget for List<'b, L> where
L: Iterator<Item = Text<'b>>,
[src]
L: Iterator<Item = Text<'b>>,
impl<'b, L> Widget for List<'b, L> where
L: Iterator<Item = Text<'b>>,
[src]
L: Iterator<Item = Text<'b>>,
Auto Trait Implementations
impl<'b, L> RefUnwindSafe for List<'b, L> where
L: RefUnwindSafe,
L: RefUnwindSafe,
impl<'b, L> Send for List<'b, L> where
L: Send,
L: Send,
impl<'b, L> Sync for List<'b, L> where
L: Sync,
L: Sync,
impl<'b, L> Unpin for List<'b, L> where
L: Unpin,
L: Unpin,
impl<'b, L> UnwindSafe for List<'b, L> where
L: UnwindSafe,
L: UnwindSafe,
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>,