pub struct Recording {
pub events: Vec<Event>,
}Expand description
Records parser events into a Vec<Event> (the enum-based, trait-free API).
The crate::Perform callback path is the zero-allocation hot path; this
recording allocates one Event per dispatch, for tests and tooling.
Fields§
§events: Vec<Event>Decoded events in dispatch order.
Implementations§
Trait Implementations§
Source§impl Perform for Recording
impl Perform for Recording
Source§fn print_bytes(&mut self, s: &[u8])
fn print_bytes(&mut self, s: &[u8])
A contiguous run of printable ASCII (
0x20..=0x7e) — display text,
the bulk hot path. Valid UTF-8 by construction, so implementations
may std::str::from_utf8_unchecked without re-validating.Source§fn csi_dispatch(
&mut self,
params: &[i32],
_sep: u16,
intermediates: &[u8],
final_byte: u8,
)
fn csi_dispatch( &mut self, params: &[i32], _sep: u16, intermediates: &[u8], final_byte: u8, )
A CSI sequence’s final byte, with collected parameters and
intermediates (private markers
? > = < + 0x20..0x2f).
Params are i32, clamped to 0..=65535; an empty colon param is the
-1 sentinel. sep records : separators: bit i is set when param
i is followed by a colon (4:2 vs 4;2). Default: ignore.Source§fn esc_dispatch(&mut self, intermediates: &[u8], byte: u8)
fn esc_dispatch(&mut self, intermediates: &[u8], byte: u8)
An escape sequence’s final byte. Default: ignore.
Source§fn hook(&mut self, params: &[i32], intermediates: &[u8], final_byte: u8)
fn hook(&mut self, params: &[i32], intermediates: &[u8], final_byte: u8)
A device-control string header arrived. Parameters are
i32 (see
csi_dispatch). Default: ignore.Source§fn put(&mut self, byte: u8)
fn put(&mut self, byte: u8)
A device-control string payload byte arrived. Raw — arbitrary, not
necessarily UTF-8 (Sixel raster, kitty graphics, base64). Default:
ignore.
Source§fn osc_dispatch(&mut self, params: &[&[u8]], bell_terminated: bool)
fn osc_dispatch(&mut self, params: &[&[u8]], bell_terminated: bool)
An operating-system command ended (params split on
;). Default: ignore.Source§fn print_codepoints(&mut self, codepoints: &[u32])
fn print_codepoints(&mut self, codepoints: &[u32])
A contiguous run of pre-decoded printable code points — the non-ASCII
bulk hot path, never C0/C1 controls. The default loops over
print; bulk cell writers can specialize to skip
per-char dispatch.Auto Trait Implementations§
impl Freeze for Recording
impl RefUnwindSafe for Recording
impl Send for Recording
impl Sync for Recording
impl Unpin for Recording
impl UnsafeUnpin for Recording
impl UnwindSafe for Recording
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more