# command.Command.requires_tmux

- **Module:** command
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/2c165c4433d1bdb747a350bd460364daa4a06a55/crates/libtmux/src/command.rs#L160
- **Page:** https://libtmux.org/en/rs/latest/reference/command-command-requires_tmux/

```
#[must_use = "use the returned command to retain its version requirement"]
pub fn requires_tmux(
    mut self,
    capability: &'static str,
    needs: crate::ReleaseVersion
) -> Self
```

Require a daemon release before dispatching this command.

Use this when a command starts work whose later cleanup needs a newer
tmux. The requirement travels with the command and its chain; refusal
happens before any member runs. Repeated calls retain the higher floor.

## Examples

```rust
use libtmux::{Command, ReleaseSuffix, ReleaseVersion};

let command = Command::new("set-buffer")
    .arg("-b").arg("temporary").sensitive_arg("payload")
    .requires_tmux("temporary buffer cleanup",
        ReleaseVersion::new(3, 4, ReleaseSuffix::FINAL));
assert_eq!(command.summary().sensitive_argument_count(), 1);
```

## Parameters

- `capability` (`&'static str`)
- `needs` (`crate::ReleaseVersion`)
