# command.CommandResult.refusal_for

- **Module:** command.CommandResult
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/command.rs#L1211
- **Page:** https://libtmux.org/en/rs/latest/reference/command-commandresult-refusal_for/

```
command.CommandResult.refusal_for(self, operation: &'static str) -> Option<crate::Error>
```

Classify a nonzero status as a refusal for a named operation.

Use a fixed operation name without targets or argument values. The
result keeps no original target, so classification uses only what tmux
echoed in stderr. Sensitive command output is withheld from the
returned error.

Returns `None` when the command succeeded.
