# error.scoped.ScopeError.into_operation

- **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#L87
- **Page:** https://libtmux.org/en/rs/latest/reference/error-scoped-scopeerror-into_operation/

```
error.scoped.ScopeError.into_operation(self) -> Option<E>
```

Take the operation's own error, when the operation is what failed.

`None` for a creation failure, where the operation never ran, and for
a cleanup-only failure, where it succeeded.

## Example

```rust
use libtmux::ScopeError;

let failed: ScopeError<(), _> = ScopeError::Operation("no route");
assert_eq!(failed.into_operation(), Some("no route"));
```
