# server.Server.environment_all

- **Module:** server.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/settings.rs#L290
- **Page:** https://libtmux.org/en/rs/latest/reference/server-server-environment_all/

```
server.Server.environment_all(self) -> Result<BTreeMap<String, EnvironmentEntry>, Error>
```

Read the server's whole environment.

Costs one tmux command, read the way
[`Session::environment_all`](crate::Session::environment_all)
describes: each value reads exactly as [`Self::environment`] reads it.

# Errors

Returns an error when tmux cannot be reached or refuses the listing,
and [`Error::DecodeListing`] when the listing is not in the shape tmux
prints. An empty map means the server holds nothing, never that the
listing failed.
