pub enum Rotation {
Up,
Down,
}Expand description
Where a split puts the new pane, relative to the one being divided.
tmux spells these -v, -v -b, -h, and -h -b, where “horizontal”
means side by side. Naming the resulting position instead removes a
question every tmux user has asked at least once.
§Examples
use libtmux::{Rotation, SplitDirection};
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
let window = session.active_window().await?.expect("a session has a window");
window.split(SplitDirection::Below).await?;
// Rotating moves panes between positions; it does not create or destroy any.
let before = window.panes().await?.len();
window.rotate(Rotation::Down).await?;
assert_eq!(window.panes().await?.len(), before);
guard.shutdown().await?;Variants§
Up
Move each pane to the position before it, so the first becomes last.
Down
Move each pane to the position after it, which is tmux’s default.
Trait Implementations§
impl Copy for Rotation
impl Eq for Rotation
impl StructuralPartialEq for Rotation
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnsafeUnpin for Rotation
impl UnwindSafe for Rotation
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