Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

error.ListingDecodeError

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
error
Package
libtmux
Source
crates/libtmux/src/error.rs
struct error.ListingDecodeError
structoverload [source]
structoverload [source]
struct 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.

Examples

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);

2 declared, 0 inherited

Members

  • field_name method Return the stable tmux format name that failed, when one is known.
  • row method Return the zero-based row that failed, when the failure reached a row.
Esc

Type to search.