README
It's a template to write rust derive macro.
The trait is designed for named struct.
- If the field of struct has attribute
#[exclude],this.fieldremain the same. - ElIf the field of struct is not
Option:this.field = that.field.clone() - ElIf the field of struct has attribute
#[force]:this.field = that.field.clone() - ElIf the field of struct is
Optionand doesn't have attribute#[force]:- If
that.field.is_some():this.field = that.field.clone() - If
that.field.is_none():this.fieldremain the same.
- If
let mut this = TestStruct ;
let that = TestStruct ;
this.merge_proto;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;