func_

Crates.iofunc_
lib.rsfunc_
version1.0.1
sourcesrc
created_at2023-09-21 12:17:28.234051
updated_at2023-09-25 02:39:53.784917
descriptionProc macro to add function name constant within body of function
homepage
repositoryhttps://github.com/DoumanAsh/func_
max_upload_size
id979394
size5,957
Douman (DoumanAsh)

documentation

https://docs.rs/func_/

README

func_

Rust Crates.io Documentation

Proc macro to insert function name within body of function because Rust is incapable of doing simple things

Once type_name is stable in const context this macro can be replaced properly with simple function call on function type.

Usage

use func_::_func_;

#[_func_]
fn my_func() {
    assert_eq!(__func__, "my_func");
}
Commit count: 2

cargo fmt