Derive Macro wd_macro::Get[][src]

#[derive(Get)]
Expand description

为结构体字段添加get该字段的引用

#[derive(ChainSet,Get)]
struct World{
    name:String,
}
#[test]
fn test_macro_get(){
    let world = World{name:String::from("hello")};
    world.say_hello_get();
    println!("hello {}",world.get_name())
}