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

DaemonState

Whether a fixture's tmux daemon is still running, and how it ended if not.

Source and package
Qualified name
libtmux::test::DaemonState
Module
test
Package
libtmux
Source
crates/libtmux/src/test.rs
enum test.DaemonState

Description#

A test drives tmux through tmux's own client, and that client reports a daemon that died as an ordinary refusal: it prints server exited unexpectedly and exits 1, the same shape as a command tmux rejected. An assertion written against the reply alone therefore blames the command. TestServer::daemon_state() answers the question the reply cannot.

Examples#

use libtmux::test::{DaemonState, TestServer};
let mut guard = TestServer::new().await?;
assert_eq!(guard.daemon_state(), DaemonState::Running);
guard.shutdown().await?;

Variants3#

DaemonState variants
CasePayloadDescription
Gone (std::process::ExitStatus) The daemon has exited, with the status the kernel reported.
Running No payload The daemon has not exited.
Unreadable No payload The wait could not be made, so the daemon's fate is unknown.

Members1#

  • is_running method Whether the daemon has not exited.
Esc

Type to search.

Reference previewOpen reference