Implement the default_trait tag
avl opened this issue · 1 comments
avl commented
#[default_trait="TraitName"] is not implemented yet.
This is a way to be able to provide arbitrary default values of complex types, to fields which did not exist in older versions of protocol.
avl commented
Changed it to be a default_fn instead, that you specify:
'''rust
fn my_default_func() -> String {
"default_value".to_string()
}
//Then, before new struct field:
#[default_fn="my_default_func"]
'''