Skip to main content

Module params

Module params 

Source
Expand description

Lazy parser for CSI, DCS, and APC 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 final byte and mode context they are handling.

Structs§

ControlSequence
A control sequence body that follows ECMA-48 §5.4.1.
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, or APC parameter body.
SubIter
Iterator over the :-separated sub-parameters of a Group.