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.

function libtmux-elixir latest

Codec.decode_field/3

Removes one framing newline and validates the complete field value.

Source and package
Qualified name
LibTmux.Codec.decode_field/3
Module
LibTmux
Declared in
Codec
Package
libtmux
Source
lib/libtmux/codec.ex
decode_field(response, type, options \\ []) @spec decode_field(binary(), :bytes | :string, [ field_option() ]) :: {:ok, binary()} | {:error, LibTmux.Error.t()}decode_field(response, type, options \\ []) @spec decode_field(binary(), :integer, [field_option()]) :: {:ok, integer()} | {:error, LibTmux.Error.t()}decode_field(response, type, options \\ []) @spec decode_field(binary(), :boolean, [field_option()]) :: {:ok, boolean()} | {:error, LibTmux.Error.t()}

Description#

See the worked example.

Parameters
  • response (binary()) #

  • type (:bytes | :string) # for decode_field/3(response, type, options) [overload 1]

  • options ([field_option()]) #

  • type (:integer) # for decode_field/3(response, type, options) [overload 2]

  • type (:boolean) # for decode_field/3(response, type, options) [overload 3]

Discussed in Command and field encoding

Esc

Type to search.

Reference preview Open reference