#[define_panic]
Available on crate feature
proc_macros
only.Expand description
Defines the given function as a panic handler.
This macro only accepts a function as an input. All functions must
follow the same rule:
fn _some_name_(info: &PanicInfo) -> !;
ยงExamples
use my_panic_macro::define_panic;
#[panic_handler]
fn my_panic_function(info: &PanicInfo) -> ! {
// Custom panic handling logic
}