Crate python_comm_macros
Version 0.1.4
See all python_comm_macros's items
在函数中自动设置局部变量 __func__ 为当前函数名
use python_comm_macros::auto_func_name; #[auto_func_name] fn test_name() -> String { return String::from(__func__); } assert_eq!(test_name(), "test_name");
有 auto_func_name 属性的函数, 用 /// 产生的文档注释在 cargo doc 中为空