pub struct List<'a> {
pub items: &'a [ListItem],
pub selected: Option<usize>,
pub highlight_style: Style,
pub highlight_symbol: &'a str,
}Fields§
§items: &'a [ListItem]§selected: Option<usize>§highlight_style: Style§highlight_symbol: &'a strImplementations§
Source§impl<'a> List<'a>
impl<'a> List<'a>
pub fn new(items: &'a [ListItem]) -> Self
pub fn with_selected(self, selected: usize) -> Self
pub fn with_highlight_style(self, style: Style) -> Self
pub fn with_highlight_symbol(self, symbol: &'a str) -> Self
pub fn render_stateful( &self, buffer: &mut Buffer, area: Rect, state: &mut ListState, )
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for List<'a>
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> UnsafeUnpin for List<'a>
impl<'a> UnwindSafe for List<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more