Expand description
An implementation of the state machine described by DEC ANSI Parser, modified to support UTF-8.
This is sufficient to broadly categorize ANSI/ECMA-48 escape sequences that are
commonly used in terminal emulators. It does not ascribe semantic meaning to
those escape sequences; for example, if you wish to parse the SGR sequence
that makes text bold, you will need to know which codes correspond to bold
in your implementation of VTActor.
You may wish to use termwiz::escape::parser::Parser in the
termwiz crate if you don’t want to have to research
all those possible escape sequences for yourself.
Structs§
- CollectingVT
Actor - This is an implementation of
VTActorthat captures the events into an internal vector. It can be iterated viainto_iteror have the internal vector extracted viainto_vec. - VTParser
- The virtual terminal parser. It works together with an implementation of
VTActor.
Enums§
- CsiParam
- Represents a parameter to a CSI-based escaped sequence.
- VTAction
VTActionis an alternative way to work with the parser; rather than implementing the VTActor trait you can useCollectingVTActorto capture the sequence of events into aVec<VTAction>.
Traits§
- VTActor
VTActoris a trait that allows the host application to process the different kinds of sequence as they are parsed from the input stream.