Function color_backtrace::install

source ·
pub fn install()
Expand description

Install a BacktracePrinter handler with ::default() settings.

This currently is a convenience shortcut for writing

use color_backtrace::{BacktracePrinter, default_output_stream};
BacktracePrinter::default().install(default_output_stream())
Examples found in repository?
examples/panic_macro.rs (line 11)
10
11
12
13
fn main() {
    color_backtrace::install();
    fn2();
}
More examples
Hide additional examples
examples/unwrap_result.rs (line 18)
17
18
19
20
fn main() {
    color_backtrace::install();
    fn1();
}
examples/assert_failed.rs (line 2)
1
2
3
4
fn main() {
    color_backtrace::install();
    assert_eq!(1, 2);
}