diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 7eee270..1fba27f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,6 +3,8 @@ use serde_derive::{Deserialize, Serialize}; #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Server { pub listen: String, + #[serde(default = "default_false")] + pub no_ack_extension: bool, } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -14,6 +16,8 @@ pub struct Service { #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Client { pub addr: String, + #[serde(default = "default_false")] + pub no_ack: bool, } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -28,3 +32,7 @@ pub struct Root { fn default_true() -> bool { true } + +fn default_false() -> bool { + false +} |