Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

enum libtmux-rs latest

ResizeDirection

Which edge a resize moves.

Source and package
Qualified name
libtmux::window::ResizeDirection
Module
window
Package
libtmux
Source
crates/libtmux/src/window.rs
enum window.ResizeDirection

Examples#

use libtmux::ResizeDirection;
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
let mut window = session.active_window().await?.expect("a session has a window");
// The direction names the edge that moves, so `Down` makes a window taller
// rather than shorter.
let before = window.height();
window.resize_by(ResizeDirection::Down, 3).await?;
assert!(window.height() >= before);
guard.shutdown().await?;

Variants4#

ResizeDirection variants
CasePayloadDescription
Down No payload Move the bottom edge down.
Left No payload Move the left edge left.
Right No payload Move the right edge right.
Up No payload Move the top edge up, making it taller.
Esc

Type to search.

Reference previewOpen reference