#[non_exhaustive]pub enum VtEvent<'m> {
Print(u8char),
PrintEnd,
ExecuteCtrl(u8),
DispatchCsi {
cmd: u8,
params: &'m [u16],
intermediates: &'m [u8],
},
DispatchEsc {
cmd: u8,
intermediates: &'m [u8],
},
DcsStart {
cmd: u8,
params: &'m [u16],
intermediates: &'m [u8],
},
DcsChar(u8char),
DcsEnd(u8),
OscStart(u8),
OscChar(u8char),
OscEnd(u8),
Error(u8char),
}Expand description
An event from VtMachine.
Some event types include borrowed values from inside the VtMachine’s
mutable state, and so all events must be dropped before writing another
character to the machine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Print(u8char)
Print a literal character at the current cursor position.
PrintEnd
Emitted at the end of a series of consecutive VtEvent::Print
events before emitting any other event, so that a terminal that
is attempting to handle Unicode grapheme clusters can treat the
transition points as “end-of-text” to reset the segmentation state
machine.
ExecuteCtrl(u8)
Execute an appropriate action for the given control character.
DispatchCsi
Execute an appropriate action for the given control sequence.
This is for sequence starting with the control sequence introducer,
ESC[, and terminated with the byte given in cmd.
Fields
DispatchEsc
DcsStart
Reports the beginning of a device control string.
Events of this type are followed by zero or more VtEvent::DcsChar
and then one VtEvent::DcsEnd, when the input stream is valid.
DcsChar(u8char)
Reports a literal character from within the “data string” portion of a device control string sequence.
DcsEnd(u8)
Marks the end of a device control string, reporting the character that ended it, which should be the “string terminator” character.
OscStart(u8)
Reports the beginning of an operating system command.
Events of this type are followed by zero or more VtEvent::OscChar
and then one VtEvent::OscEnd, when the input stream is valid.
OscChar(u8char)
Reports a literal character from within an operating system command.
OscEnd(u8)
Marks the end of an operating system command, reporting the character that ended it.
Error(u8char)
Emitted whenever the state machine encounters a character that is not expected in its current state.