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.

MoreLess about this notice

method libtmux-rs

Pane.wait_for_quiet

Wait until this pane stops producing output for quiet_for.

Source and package
Qualified name
libtmux::pane::Pane::wait_for_quiet
Module
pane
Declared in
Pane
Package
libtmux
Source
crates/libtmux/src/pane/observe.rs
pub async fn wait_for_quiet( &self, quiet_for: Duration, within: Duration, ) -> Result<PaneWait, Error>
Completion
Returns a future that runs when awaited.signature · observe.rs:360
Errors
Returns an error when tmux cannot be reached or refuses a capture. Running out of time is PaneWait::TimedOut, not an error.doc comment · :330

Description

For work that prints nothing recognisable at its end. Quiet is measured from the last change this saw, so it cannot be shorter than the 120ms interval Pane::wait_for_text() describes: a smaller quiet_for is rounded up to it rather than refused. A caller wanting a specific string should say so with Pane::wait_for_text(), which answers as soon as it appears rather than after a silence.

Errors

Returns an error when tmux cannot be reached or refuses a capture. Running out of time is PaneWait::TimedOut, not an error.

Cancel safety

Nothing happened: a look only reads. A retry measures quiet afresh, from its own first look.

Examples

use libtmux::PaneWait;
use std::time::Duration;
let settled = pane
.wait_for_quiet(Duration::from_millis(300), Duration::from_secs(10))
.await?;
assert_eq!(settled, PaneWait::Arrived);

Recorded calls

source calls
No call edges in the Rust model.

The Rust reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls pane.Pane.wait_for_quiet.

tmux command

task material

The tmux commands behind wait_for_quiet.

tmux C API

task material

The C declarations in tmux that implement these commands.

Esc
Search in

Type to search.

Reference previewOpen reference