Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

pane.Pane.wait_for_quiet

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
pane
Declared in
Pane
Package
libtmux
Source
crates/libtmux/src/pane/observe.rs
wait_for_quiet ( self , quiet_for : Duration , within : Duration ) → Result<PaneWait, Error>
method [source]
method [source]
wait_for_quiet

Wait until this pane stops producing output for quiet_for.

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);

0 declared, 0 inherited

Esc

Type to search.