Skip to main content

Module tap

Module tap 

Source
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§

BacktraceFrame
Represents a frame parsed from a stack backtrace.
PanicInfo
Panic parsed from a stderr dump.
StderrTap
Record stderr of a child process while also passing though the output to the running process output.
StdoutTap
Record stdout of a child process while also passing though the output to the running process output.

Functions§

contains_ansi_csi
If s contains ANSI escape sequences (CSI).
remove_ansi_csi
Remove ANSI escape sequences (CSI) from s.