pub struct Tabs<'a, T>{ /* private fields */ }Expand description
A widget to display available tabs in a multiple panels context.
§Examples
Tabs::default()
.block(Block::default().title("Tabs").borders(Borders::ALL))
.titles(&["Tab1", "Tab2", "Tab3", "Tab4"])
.style(Style::default().fg(Color::White))
.highlight_style(Style::default().fg(Color::Yellow))
.divider(DOT);Implementations§
Source§impl<'a, T> Tabs<'a, T>
impl<'a, T> Tabs<'a, T>
pub fn block(self, block: Block<'a>) -> Tabs<'a, T>
pub fn titles(self, titles: &'a [T]) -> Tabs<'a, T>
pub fn select(self, selected: usize) -> Tabs<'a, T>
pub fn style(self, style: Style) -> Tabs<'a, T>
pub fn highlight_style(self, style: Style) -> Tabs<'a, T>
pub fn divider(self, divider: &'a str) -> Tabs<'a, T>
Trait Implementations§
Source§impl<'a, T> Widget for Tabs<'a, T>
impl<'a, T> Widget for Tabs<'a, T>
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, T> Freeze for Tabs<'a, T>
impl<'a, T> RefUnwindSafe for Tabs<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Tabs<'a, T>where
T: Sync,
impl<'a, T> Sync for Tabs<'a, T>where
T: Sync,
impl<'a, T> Unpin for Tabs<'a, T>
impl<'a, T> UnwindSafe for Tabs<'a, T>where
T: RefUnwindSafe,
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