Codec
Decodes bounded field responses and control-output bytes.
Source and package
- Qualified name
-
LibTmux .Codec - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/codec.ex
-
Description#
A field response contains one free-form field and one framing newline. The default raw mode removes only its framing newline and requires a separately qualified raw source. Use
encoding: :escaped_v1for output produced byLibTmux.Format.field/1, including tmux 3.4's print path. This is a conservative response codec, not a multi-field row codec.
Members4#
Common operations1#
- decode_field/3 function Removes one framing newline and validates the complete field value.
Other members3#
- decode_output/2 function Decodes tmux's three-digit octal output escapes as bytes.
- field_option/0: field
_option () :: {:encoding, :raw | :escaped_v1} | {:max_bytes, pos_integer ()} | {:min | :max, integer() | nil} typealias Field framing and value validation options; min and max apply only to integer fields. - field_type/0: field
_type () :: :bytes | :string | :integer | :boolean typealias The required decoded field category; string additionally requires valid UTF-8.