mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
Add setters to LoginUrl
This commit is contained in:
parent
1ce57eedbc
commit
be02c16936
1 changed files with 31 additions and 0 deletions
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue