Crate wd_macro[][src]

Derive Macros

ChainSet

为结构体添加链式处理方法 #[derive(ChainSet)] struct Hello{ name:String, } #test fn test_macro(){ let name = “hello”.to_string(); let hello = Hello{name}; let hello = hello.cset_name(“world”.to_string()); println!(“hello {}”,hello.name) }