diff options
author | Keuin <[email protected]> | 2023-09-05 01:52:56 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-09-05 01:56:21 +0800 |
commit | 50dbc034090614d004d097c7a45b0a28a3bbb80b (patch) | |
tree | b8ad419bb8c2fed12ac419274755c716166eb90b /src/config.rs | |
parent | 863473cdcb29d9989c39b4ff96bd54e14b13c6b6 (diff) |
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 +} |