Expand description
Helper types for recording stdout/err and parsing the error output.
Both StdoutTap and StderrTap record a child process stream while still propagating to
the parent stream. After the child closes the stream the recording can be converted to string
and parsed to retrieve data such as a panic printout.
§ANSI Escape Sequences
Use contains_ansi_csi and remove_ansi_csi to convert styled output to plain text.
§Panic
Use the PanicInfo::find to find and parse the last panic printout from stderr. Use PanicInfo::set_hook
on the child process to ensure the panic message is formatted in a compatible way.
Structs§
- Backtrace
Frame - Represents a frame parsed from a stack backtrace.
- Panic
Info - Panic parsed from a
stderrdump. - Stderr
Tap - Record stderr of a child process while also passing though the output to the running process output.
- Stdout
Tap - Record stdout of a child process while also passing though the output to the running process output.
Functions§
- contains_
ansi_ csi - If
scontains ANSI escape sequences (CSI). - remove_
ansi_ csi - Remove ANSI escape sequences (CSI) from
s.