On this page
session.Session.next_window
- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
-
Move to the next window, and return it.
Nonewhen there is no next window, which a session holding one window never has. That is an ordinary state rather than a failure, so it is reported as absence; an error means tmux could not be reached or refused the move for some other reason.Errors
Returns an error when tmux cannot be reached or refuses the move.
Examples
let guard = libtmux::test::TestServer::new().await?; let session = guard.server().new_session("moving").await?; // One window, so there is nowhere to go and nothing broke. assert!(session.next_window().await?.is_none()); session.new_window("second").await?; assert!(session.next_window().await?.is_some()); guard.shutdown().await?;
0 declared, 0 inherited