Skip to main content

func_name

Macro func_name 

Source
macro_rules! func_name {
    () => { ... };
}
Expand description

Get the name of the function where the macro is invoked. Returns a &'static str.

ยงExample

use fastrace::func_name;

fn foo() {
    assert_eq!(func_name!(), "foo");
}