From 23aa4842cff153575d26899bcff9c539f5f535a4 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Tue, 28 Jul 2020 02:07:26 +0600 Subject: [PATCH] Add setters to MessageConnectedWebsite --- src/types/message.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/types/message.rs b/src/types/message.rs index 066d12dd..258a27bb 100644 --- a/src/types/message.rs +++ b/src/types/message.rs @@ -397,6 +397,23 @@ pub struct MessageConnectedWebsite { pub connected_website: String, } +impl MessageConnectedWebsite { + pub fn new(connected_website: S) -> Self + where + S: Into, + { + Self { connected_website: connected_website.into() } + } + + pub fn connected_website(mut self, val: S) -> Self + where + S: Into, + { + self.connected_website = val.into(); + self + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MessagePassportData {