def_as_mut!() { /* proc-macro */ }
Expand description
this macro will define macro as_mut
example:
def_as_mut!();
fn main() {
let mut example = Sub::new("data".to_string());
as_mut!(example).set_data("modified".to_string());
assert_eq!(example.get_data(), "modified".to_string());
}