# error.scoped.ScopeError.tmux_error

- **Module:** error.scoped.ScopeError
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/error/scoped.rs#L141
- **Page:** https://libtmux.org/en/rs/latest/reference/error-scoped-scopeerror-tmux_error/

```
error.scoped.ScopeError.tmux_error(self) -> Option<&Error>
```

Borrow the tmux error from creation or cleanup.

`None` for [`Self::Operation`], whose `E` is the caller's own type.

## Example

```rust
use libtmux::ScopeError;

let failed: ScopeError<(), &str> = ScopeError::Operation("no route");
assert!(failed.tmux_error().is_none());
```
