aboutsummaryrefslogtreecommitdiff
path: root/src/message/handshake/init.rs
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-09-28 18:05:48 +0200
committerMax Audron <audron@cocaine.farm>2021-09-28 18:16:11 +0200
commit25d4da290f48015fa6a06b6da8cf4ef1ceb147d5 (patch)
treebf35f038465cae96bedecb0892588e5bb2ec699e /src/message/handshake/init.rs
parentswitch AliasManager to use split network translation traits (diff)
convert Init struct's methods to builder style
Diffstat (limited to 'src/message/handshake/init.rs')
-rw-r--r--src/message/handshake/init.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/message/handshake/init.rs b/src/message/handshake/init.rs
index df1b29e..51514ff 100644
--- a/src/message/handshake/init.rs
+++ b/src/message/handshake/init.rs
@@ -15,12 +15,14 @@ impl Init {
}
}
- pub fn compression(mut self, v: bool) {
- self.compression = v
+ pub fn compression(mut self, v: bool) -> Self {
+ self.compression = v;
+ self
}
- pub fn tls(mut self, v: bool) {
- self.tls = v
+ pub fn tls(mut self, v: bool) -> Self {
+ self.tls = v;
+ self
}
pub fn serialize(self) -> Vec<u8> {