Core LibraryalphaAPI Reference

Choose documentation 1

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

module libtmux-elixir latest

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
LibTmux.Codec

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_v1 for output produced by LibTmux.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.
Esc

Type to search.

Reference preview Open reference