Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

Rust API

method libtmux-rs latest

Server.daemon_version

Return the version of the daemon this handle reaches.

Source and package
Qualified name
server.Server.daemon_version
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
pub async fn daemon_version(&self) -> Result< TmuxVersion, Error >

Description#

The version has passed the supported-minimum check. A cold endpoint reports the executable that would start the daemon. The answer is cached with the handle's other version checks, so asking costs one probe at most, and no user hook runs.

Errors

Returns Error::UnsupportedTmuxVersion or Error::UnrecognizedTmuxVersion for a daemon libtmux refuses, Error::InvalidVersionOutput or Error::VersionProbeFailed when no version can be read, and a transport error when tmux cannot be run. Nothing is sent to the daemon in any of those cases.

Examples#

let guard = libtmux::test::TestServer::new().await?;
let version = guard.server().daemon_version().await?;
assert!(version.meets(&libtmux::TmuxVersion::MIN_SUPPORTED));
guard.shutdown().await?;
Parameters
Esc

Type to search.

Reference preview Open reference