ListingDecodeError
Payload-free metadata describing why tmux output could not be decoded.
Source and package
- Qualified name
-
libtmux::error:: Listing Decode Error - Module
- error
- Package
- libtmux
- Source
- crates/libtmux/src/error.rs
-
Description#
This never retains row bytes, snapshot text, or decoded values, so it is safe to log wherever the rest of
Erroris.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.