# session.EnvironmentEntry

- **Module:** session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** enum
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/session.rs#L66
- **Page:** https://libtmux.org/en/rs/latest/reference/session-environmententry/

What a session's environment holds for one name.

tmux keeps two different things under a name: a value, and a mark saying a
process started here must *not* inherit the name at all. They are not the
same as absence, and they are not the same as each other.

## Example

```rust
use libtmux::EnvironmentEntry;

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("env").await?;

session.set_environment("EDITOR", "hx").await?;
assert!(matches!(
    session.environment("EDITOR").await?,
    Some(EnvironmentEntry::Set(value)) if value.as_bytes() == b"hx",
));

// Hiding a name is not unsetting it: a process started here is handed the
// name *absent*, which tmux still records and reports.
session.hide_environment("EDITOR").await?;
assert_eq!(
    session.environment("EDITOR").await?,
    Some(EnvironmentEntry::Removed),
);

// Never set at all is the third thing, and the only one that is `None`.
assert_eq!(session.environment("NEVER_SET").await?, None);

guard.shutdown().await?;
```

## Members

- `Set` (constant): tmux holds this value, exactly as stored.
- `Removed` (constant): tmux will remove this name from the environment it hands out.
