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

ControlLimits

What one control-mode connection may accumulate before it gives up.

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

Description#

Control mode is a framed text protocol read from a process that keeps running, so the framing is the only thing bounding memory: a line that never ends, or a %begin block whose %end never arrives, otherwise grows until the machine notices. A subprocess dispatch at least ends when the process does.

Examples#

use libtmux::ControlLimits;
let limits = ControlLimits::default().max_line_bytes(4096);
assert_eq!(limits.line_bytes(), 4096);

Members6#

  • block_bytes method The budget for one command's response block.
  • DEFAULT_BLOCK_BYTES: usize constant 64 MiB for one %begin/%end block, which is a whole command's answer rather than one line.
  • DEFAULT_LINE_BYTES: usize constant 8 MiB for one line. A pane printing a single enormous line is the realistic way to reach this, and it is well past anything a terminal displays.
  • line_bytes method The budget for a single protocol line.
  • max_block_bytes method Set the budget for one command's response block.
  • max_line_bytes method Set the budget for a single protocol line.
Esc

Type to search.

Reference previewOpen reference