Add setters to LoginUrl

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 01:10:45 +06:00
parent 1ce57eedbc
commit be02c16936

View file

@ -21,3 +21,34 @@ pub struct LoginUrl {
pub bot_username: Option<String>, pub bot_username: Option<String>,
pub request_write_access: Option<bool>, pub request_write_access: Option<bool>,
} }
impl LoginUrl {
pub fn url<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.url = val.into();
self
}
pub fn forward_text<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.forward_text = Some(val.into());
self
}
pub fn bot_username<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.bot_username = Some(val.into());
self
}
pub fn request_write_access<S>(mut self, val: bool) -> Self {
self.request_write_access = Some(val);
self
}
}