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
-
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::UnsupportedTmuxVersionorError::UnrecognizedTmuxVersionfor a daemon libtmux refuses,Error::InvalidVersionOutputorError::VersionProbeFailedwhen 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?;