# control.Subscription

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

What a subscription watches.

tmux reads this from the shape of the argument rather than from a keyword:
`%` introduces a pane, `@` a window, `*` stands for every one of them, and
anything else names the session the control client is attached to. The
session case is therefore spelled as nothing at all, which is the canonical
form rather than a special case.

## Example

```rust
use libtmux::control::Subscription;

assert_eq!(Subscription::AllPanes.to_string(), "%*");
assert_eq!(Subscription::AllWindows.to_string(), "@*");

// The session the connection is attached to, named by naming nothing.
assert_eq!(Subscription::Session.to_string(), "");
```

## Members

- `Session` (constant): The session this connection is attached to.
- `Window` (constant): One window.
- `AllWindows` (constant): Every window in the attached session.
- `Pane` (constant): One pane.
- `AllPanes` (constant): Every pane in the attached session.
