Skip to main content

Module params

Module params 

Source
Expand description

Lazy parser for CSI and DCS parameter bodies.

§Category

ControlSequence splits a sequence into the regions ECMA-48 names: parameter bytes, intermediate bytes, and the final byte that identifies the control function. Params and Group then walk the parameter region, handling semicolon-separated parameters and colon-separated subparameters without allocating.

§Parameter grammar

A body such as 38:2::255:100:50;1 is viewed as two top-level groups. Empty slots decode to None; numeric slots decode to Some(value).

38:2::255:100:50  ;  1
─────────┬────────   ┬
     group 0       group 1

§Mode interaction

Parameter defaults are sequence-specific. Callers apply defaults with Params::get_or after they know which CSI/DCS final byte and mode context they are handling.

Structs§

ControlSequence
A control sequence as ECMA-48 5th edition section 5.4 defines it: parameter bytes, intermediate bytes, and a final byte identifying the control function.
Group
One ;-separated group within a Params body. Wraps the raw bytes for that group (no separator); decodes its colon-separated sub-parameters on demand.
ParamIter
Iterator over the ;-separated groups of a Params.
Params
Borrowed view of a CSI / DCS parameter body.
SubIter
Iterator over the :-separated sub-parameters of a Group.