pub struct Sparkline<'a> { /* private fields */ }Expand description
Widget to render a sparkline over one or more lines.
§Examples
Sparkline::default()
.block(Block::default().title("Sparkline").borders(Borders::ALL))
.data(&[0, 2, 3, 4, 1, 4, 10])
.max(5)
.style(Style::default().fg(Color::Red).bg(Color::White));Implementations§
Trait Implementations§
Source§impl<'a> Widget for Sparkline<'a>
impl<'a> Widget for Sparkline<'a>
Source§fn draw(&mut self, area: Rect, buf: &mut Buffer)
fn draw(&mut self, area: Rect, buf: &mut Buffer)
Draws the current state of the widget in the given buffer. That the only method required to
implement a custom widget.
Auto Trait Implementations§
impl<'a> Freeze for Sparkline<'a>
impl<'a> RefUnwindSafe for Sparkline<'a>
impl<'a> Send for Sparkline<'a>
impl<'a> Sync for Sparkline<'a>
impl<'a> Unpin for Sparkline<'a>
impl<'a> UnwindSafe for Sparkline<'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