pub struct SwapPane<'a> {
pub detached: bool,
pub previous_pane: bool,
pub next_pane: bool,
pub keep_zoomed: bool,
pub src_pane: Option<Cow<'a, str>>,
pub dst_pane: Option<Cow<'a, str>>,
/* private fields */
}
Expand description
Swap two panes
§Manual
tmux ^3.1:
swap-pane [-dDUZ] [-s src-pane] [-t dst-pane]
(alias: swapp)
tmux ^1.0:
swap-pane [-dDU] [-s src-pane] [-t dst-pane]
(alias: swapp)
tmux ^0.8:
swap-pane [-dDU] [-p src-index] [-t target-window] [-q dst-index]
(alias: swapp)
Fields§
§detached: bool
[-d]
- instruct tmux not to change the active pane
previous_pane: bool
[-D]
- swap with the next pane
next_pane: bool
[-U]
- swap with the previous pane
keep_zoomed: bool
[-Z]
- keep the window zoomed if it was zoomed
src_pane: Option<Cow<'a, str>>
[-s src-pane]
- src-pane
dst_pane: Option<Cow<'a, str>>
[-t dst-pane]
- dst-pane
Implementations§
Source§impl<'a> SwapPane<'a>
impl<'a> SwapPane<'a>
pub fn new() -> Self
Sourcepub fn previous_pane(self) -> Self
pub fn previous_pane(self) -> Self
[-D]
- swap with the next pane
Sourcepub fn keep_zoomed(self) -> Self
pub fn keep_zoomed(self) -> Self
[-Z]
- keep the window zoomed if it was zoomed
pub fn build(self) -> TmuxCommand<'a>
Trait Implementations§
Source§impl<'a> From<SwapPane<'a>> for TmuxCommand<'a>
impl<'a> From<SwapPane<'a>> for TmuxCommand<'a>
Source§impl<'a> Ord for SwapPane<'a>
impl<'a> Ord for SwapPane<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for SwapPane<'a>
impl<'a> PartialOrd for SwapPane<'a>
impl<'a> Eq for SwapPane<'a>
impl<'a> StructuralPartialEq for SwapPane<'a>
Auto Trait Implementations§
impl<'a> Freeze for SwapPane<'a>
impl<'a> RefUnwindSafe for SwapPane<'a>
impl<'a> Send for SwapPane<'a>
impl<'a> Sync for SwapPane<'a>
impl<'a> Unpin for SwapPane<'a>
impl<'a> UnwindSafe for SwapPane<'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