OutputLimits
How many bytes one dispatch may read from each stream.
Source and package
- Qualified name
-
libtmux::limits:: Output Limits - Module
- limits
- Package
- libtmux
- Source
- crates/libtmux/src/limits.rs
-
Description#
Exceeding a budget fails the dispatch with
Error::OutputLimitExceededrather 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#
- DEFAULT_STDERR_BYTES: usize constant 1 MiB of stderr. tmux's errors are one line; anything approaching this is a runaway rather than a message.
- DEFAULT_STDOUT_BYTES: usize constant 32 MiB of stdout, which is more history than a pane usually holds.
- max_stderr_bytes method Set the stderr budget for one dispatch.
- max_stdout_bytes method Set the stdout budget for one dispatch.
- stderr_bytes method The stderr budget for one dispatch.
- stdout_bytes method The stdout budget for one dispatch.