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