Expand description
Hook installation helpers.
miette stores its error hook in a process-global OnceLock, which
means miette::set_hook succeeds only on the first call and refuses
subsequent attempts with InstallError. To give callers mutable,
idempotent semantics โ swap the footer at any time, call
install_* twice without panicking โ we install a single wrapper
handler that reads from our own, mutable footer slot at render time.
The net effect for callers: all three install_* functions are safe
to call in any order, any number of times.
Functionsยง
- install_
panic_ hook - Install the
miettepanic hook, routing panics through the same graphical report pipeline. - install_
report_ handler - Install the default
miettegraphical report handler. - install_
with_ footer - Install the report handler (if not already) and register a closure that appends a tool-specific support footer to every rendered diagnostic.