pub struct List<'b, L, MSG>{
pub events: Vec<Attribute<Event, MSG>>,
/* private fields */
}
Fields§
§events: Vec<Attribute<Event, MSG>>
events attached to this block
Implementations§
Source§impl<'b, L, MSG> List<'b, L, MSG>
impl<'b, L, MSG> List<'b, L, MSG>
pub fn new(items: L) -> Self
pub fn block(self, block: Block<'b, MSG>) -> Self
pub fn items<I>(self, items: I) -> Selfwhere
I: IntoIterator<Item = Text<'b>, IntoIter = L>,
pub fn style(self, style: Style) -> Self
pub fn start_corner(self, corner: Corner) -> Self
pub fn area(self, area: Rect) -> Self
Trait Implementations§
Source§impl<'b, L, MSG> Widget for List<'b, L, MSG>
impl<'b, L, MSG> Widget for List<'b, L, MSG>
fn get_area(&self) -> Rect
Source§fn draw(&mut self, buf: &mut Buffer)
fn draw(&mut self, buf: &mut Buffer)
Draws the current state of the widget in the given buffer. That the only method required to
implement a custom widget.
Source§fn background(&self, buf: &mut Buffer, color: Color)
fn background(&self, buf: &mut Buffer, color: Color)
Helper method to quickly set the background of all cells inside the specified area.
Source§fn render<B>(&mut self, f: &mut Frame<'_, B>)
fn render<B>(&mut self, f: &mut Frame<'_, B>)
Helper method that can be chained with a widget’s builder methods to render it.
fn top(&self) -> u16
fn bottom(&self) -> u16
fn left(&self) -> u16
fn right(&self) -> u16
Auto Trait Implementations§
impl<'b, L, MSG> Freeze for List<'b, L, MSG>where
L: Freeze,
impl<'b, L, MSG> !RefUnwindSafe for List<'b, L, MSG>
impl<'b, L, MSG> !Send for List<'b, L, MSG>
impl<'b, L, MSG> !Sync for List<'b, L, MSG>
impl<'b, L, MSG> Unpin for List<'b, L, MSG>where
L: Unpin,
impl<'b, L, MSG> !UnwindSafe for List<'b, L, MSG>
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