# server.settings.Server.environment_all

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

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

Read the server's whole environment.

Costs one tmux command per variable, for the reason given on
[`Session::environment_all`](crate::Session::environment_all): a value
containing a newline occupies
more than one line of the listing, and a continuation line holding an
`=` cannot be told from the next variable.

# Errors

Returns an error when tmux cannot be reached or refuses the listing.
An empty map means the server holds nothing, never that the listing
failed.
