ServerIdentity
The structural identity of one tmux server endpoint.
Source and package
- Qualified name
-
libtmux::target:: Server Identity - Module
- target
- Package
- libtmux
- Source
- crates/libtmux/src/target.rs
-
Description#
Equality and hashing use the captured absolute socket path. Debug output redacts that path so diagnostics do not disclose local filesystem details.
This is what makes two handles to the same server compare equal, and it is deliberately not enough to say the daemon behind them is the same one -- see
ServerGenerationfor that.Examples#
let guard = libtmux::test::TestServer::new().await?;let server = guard.server();// Two handles to one endpoint share an identity, so they can key a map.let second = server.clone();assert_eq!(server.identity(), second.identity());// The socket path never reaches diagnostics.let rendered = format!("{:?}", server.identity());assert!(rendered.contains("<redacted>"), "{rendered}");assert!(!rendered.contains("/tmp/"), "{rendered}");guard.shutdown().await?;