Skip to main content

Module structured

Module structured 

Source
Expand description

Packed binary cell backend for ratatui.

Implements ratatui::backend::Backend with a binary wire format instead of ANSI escape sequences. Each cell is packed into ~14 bytes:

[x: u16] [y: u16] [symbol_len: u8] [symbol: 1-4 bytes] [fg: u32] [bg: u32] [modifiers: u16]

The TUI display server deserializes directly into PaneBuffer cells, bypassing VTE parsing (~30ns/cell vs ~120ns/cell for ANSI→VTE).

Structs§

DecodedCell
A decoded cell from structured binary data.
StructuredBackend
A backend that writes packed binary cell data to a sink.

Constants§

STRUCTURED_MAGIC
Magic header bytes identifying a structured frame.

Functions§

decode_structured
Decode structured cells from a binary buffer.
pack_color
Pack a ratatui Color into a u32 for wire format.
unpack_color
Unpack a u32 into a ratatui Color.