# error.ListingDecodeError

- **Module:** error
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/error.rs#L1085
- **Page:** https://libtmux.org/en/rs/latest/reference/error-listingdecodeerror/

Payload-free metadata describing why tmux output could not be decoded.

This never retains row bytes, snapshot text, or decoded values, so it is
safe to log wherever the rest of [`Error`] is.

## Example

```rust
use libtmux::Error;

// Reached through the one variant that carries it. Both accessors are
// optional because tmux does not always give enough to locate the row.
fn locate(failure: &Error) -> Option<(&'static str, Option<usize>)> {
    match failure {
        Error::DecodeListing { list_command, detail, .. } => {
            Some((*list_command, detail.row()))
        }
        _ => None,
    }
}

// The payload is metadata only: no tmux bytes are retained, so logging it
// cannot leak a pane's contents.
let other = libtmux::Server::builder()
    .socket_name("named")
    .socket_path("/tmp/libtmux-rs-dev/explicit")
    .build()
    .expect_err("two socket selectors");
assert_eq!(locate(&other), None);
```

## Members

- `row` (method): Return the zero-based row that failed, when the failure reached a row.
- `field_name` (method): Return the stable tmux format name that failed, when one is known.
