# pane.settings.Pane.set_option

- **Module:** pane.settings.Pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/pane/settings.rs#L94
- **Page:** https://libtmux.org/reference/rs/pane-settings-pane-set_option/

```
pane.settings.Pane.set_option(self, name: &str, value: impl Into<OsString>) -> Result<(), Error>
```

Set one option.

The value is marked sensitive, so it never reaches `Debug`, an error,
or a tracing span.

# Errors

Returns an error when tmux rejects the name or value.

Returns [`crate::Error::OptionScopeMismatch`] when tmux keeps the
option in another of its tables.
