pub enum TabTarget {
Single(FocusChange),
AllBut(FocusChange),
All,
}Expand description
This represents what tabs are targeted by a tab command.
Variants§
Single(FocusChange)
Close the tab targeted by FocusChange.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, TabAction};
let fc = TabTarget::Single(FocusChange::Current);
let flags = CloseFlags::NONE;
let act: Action = TabAction::Close(fc, flags).into();
assert_eq!(act, action!("tab close -t (single current) -F none"));AllBut(FocusChange)
Close all tab except for the one targeted by FocusChange.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, TabAction};
let fc = TabTarget::AllBut(FocusChange::Current);
let flags = CloseFlags::NONE;
let act: Action = TabAction::Close(fc, flags).into();
assert_eq!(act, action!("tab close -t (all-but current) -F none"));All
Close all tabs.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, TabAction};
let fc = TabTarget::All;
let flags = CloseFlags::NONE;
let act: Action = TabAction::Close(fc, flags).into();
assert_eq!(act, action!("tab close -t all -F none"));Trait Implementations§
impl Eq for TabTarget
impl StructuralPartialEq for TabTarget
Auto Trait Implementations§
impl Freeze for TabTarget
impl RefUnwindSafe for TabTarget
impl Send for TabTarget
impl Sync for TabTarget
impl Unpin for TabTarget
impl UnwindSafe for TabTarget
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