# LibTmux::Format

- **Package:** LibTmux
- **Language:** Raku
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Format.rakumod#L3
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-format/

# Declared FORMAT projections
A Projection validates ordered catalogue field names, acquisition context,
capabilities, and nullable-field dependencies before generating a template.
Its schema identifies the field order, codec, and output-repair profile.
The separately retained incarnation binds a prepared projection to a daemon;
the engine validates that identity before dispatch.

Feed binary output to FrameDecoder and call finish at process completion.
An incomplete record, malformed token, exceeded bound, or mismatched schema
throws X::LibTmux::Decode and closes the decoder. Row numbers start at one;
offsets count bytes from the start of the response. Field conversion errors
identify the field's starting offset; token errors locate the offending byte.

DecodedRow.bytes retains exact immutable payload bytes. Its value method
performs strict UTF-8 conversion for text only when requested. State reports
domain null independently from a present empty string, zero, or false.
Rows are constructed through Projection.decode-row and retain the projection's
daemon identity as a string; they do not retain an executor or connection.
An empty raw q/a token is accepted only when its declared null policy and
projected dependencies establish domain null; present empty text remains quoted.
No decoding stage evaluates tmux commands, shell syntax, or Raku source.

## Members

### Other members

- [`DecodedRow`](/en/raku/latest/reference/libtmux-format-decodedrow/) (class): Exact captured field bytes and scalar values. Text conversion is explicit.
- [`FrameDecoder`](/en/raku/latest/reference/libtmux-format-framedecoder/) (class): Incremental LF framing over bytes with terminal failure and explicit limits.
- [`Projection`](/en/raku/latest/reference/libtmux-format-projection/) (class): Ordered registered fields with an explicit acquisition context and codec.
