pub struct Tabs { /* private fields */ }Expand description
Every tab, with one current. There is always at least one.
Implementations§
Source§impl Tabs
impl Tabs
pub fn new(view: ViewId) -> Self
pub fn current(&self) -> &Tree
pub fn current_mut(&mut self) -> &mut Tree
pub fn index(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn open(&mut self, view: ViewId)
pub fn open(&mut self, view: ViewId)
Open a tab after the current one and switch to it, as :tabnew does.
Sourcepub fn close(&mut self) -> bool
pub fn close(&mut self) -> bool
Close the current tab. Returns false when it is the last one, a session with no tabs has nothing to draw, and quitting is a separate decision from closing.
pub fn previous(&mut self)
Trait Implementations§
impl Eq for Tabs
impl StructuralPartialEq for Tabs
Auto Trait Implementations§
impl Freeze for Tabs
impl RefUnwindSafe for Tabs
impl Send for Tabs
impl Sync for Tabs
impl Unpin for Tabs
impl UnsafeUnpin for Tabs
impl UnwindSafe for Tabs
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