# server.Server.daemon_version

- **Module:** server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/84de9258a07d10bdd5f6da01b016a9ae06fe1210/crates/libtmux/src/server.rs#L757
- **Page:** https://libtmux.org/en/rs/latest/reference/server-server-daemon_version/

```
pub async fn daemon_version(&self) -> Result<
    TmuxVersion,
    Error
>
```

Return the version of the daemon this handle reaches.

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

```rust
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

- `&self`
