diff options
| author | Max Audron <audron@cocaine.farm> | 2021-11-30 18:43:47 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-11-30 18:43:47 +0100 |
| commit | 56abafc94d5992c75ff2b1d965a12dc78f1224ec (patch) | |
| tree | bdcf0b352294673c1f432c7f0c031a10a6c1fd00 /derive/src/network/mod.rs | |
| parent | statetracker: add bufferview widget and do some reorganization (diff) | |
add default and skip properties to Network derive macros
Diffstat (limited to 'derive/src/network/mod.rs')
| -rw-r--r-- | derive/src/network/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/derive/src/network/mod.rs b/derive/src/network/mod.rs index 61af9c4..61338e5 100644 --- a/derive/src/network/mod.rs +++ b/derive/src/network/mod.rs @@ -57,6 +57,13 @@ pub struct NetworkField { /// network representation for this field #[darling(default)] map: bool, + /// Skips this field when parsing from network + /// representation and uses the default value of the type + #[darling(default)] + default: bool, + /// Skips this field when serializing to network representation + #[darling(default)] + skip: bool, } fn parse_fields(input: &syn::DeriveInput) -> Vec<NetworkField> { |
