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

OutputLimits

How many bytes one dispatch may read from each stream.

Source and package
Qualified name
libtmux::limits::OutputLimits
Module
limits
Package
libtmux
Source
crates/libtmux/src/limits.rs
struct limits.OutputLimits

Description#

Exceeding a budget fails the dispatch with Error::OutputLimitExceeded rather than truncating, because a truncated tmux listing is a shorter listing: it decodes cleanly and says something false. A caller who wants the first N bytes of a pane asks tmux for them.

Examples#

use libtmux::OutputLimits;
// The default is roomy enough for a pane with a very long history.
assert_eq!(OutputLimits::default().stdout_bytes(), 32 * 1024 * 1024);
// Tighten it where the caller knows the answer is small.
let limits = OutputLimits::default().max_stdout_bytes(64 * 1024);
assert_eq!(limits.stdout_bytes(), 64 * 1024);

Members6#

Esc

Type to search.

Reference previewOpen reference