Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

module libtmux-elixir

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 members

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
Search in

Type to search.

Reference previewOpen reference