Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-rs latest

ListingDecodeError

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

Source and package
Qualified name
libtmux::error::ListingDecodeError
Module
error
Package
libtmux
Source
crates/libtmux/src/error.rs
struct error.ListingDecodeError

Description#

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

Members2#

  • 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.

Reference previewOpen reference