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

Server.daemon_version

Return the version of the daemon this handle reaches.

Source and package
Qualified name
libtmux::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 >
Completion
Returns a future that runs when awaited.signature · server.rs:846
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. A version probe may already have reached the daemon before an error.doc comment · :825

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. A version probe may already have reached the daemon before an error.

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

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 server.Server.daemon_version.

Esc
Search in

Type to search.

Reference previewOpen reference