mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Add setters to InlineQueryResultDocument
This commit is contained in:
parent
0c47f2b0f5
commit
d7336fe2cb
1 changed files with 80 additions and 0 deletions
|
@ -56,3 +56,83 @@ pub struct InlineQueryResultDocument {
|
|||
/// Thumbnail height.
|
||||
pub thumb_height: Option<i32>,
|
||||
}
|
||||
|
||||
impl InlineQueryResultDocument {
|
||||
pub fn id<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.id = val.into();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn title<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.title = val.into();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn caption<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.caption = Some(val.into());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn parse_mode<S>(mut self, val: ParseMode) -> Self {
|
||||
self.parse_mode = Some(val);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn document_url<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.document_url = val.into();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn mime_type(mut self, val: MimeWrapper) -> Self {
|
||||
self.mime_type = val;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn description<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.description = Some(val.into());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn reply_markup(mut self, val: InlineKeyboardMarkup) -> Self {
|
||||
self.reply_markup = Some(val);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn input_message_content(mut self, val: InputMessageContent) -> Self {
|
||||
self.input_message_content = Some(val);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn thumb_url<S>(mut self, val: S) -> Self
|
||||
where
|
||||
S: Into<String>,
|
||||
{
|
||||
self.thumb_url = Some(val.into());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn thumb_width(mut self, val: i32) -> Self {
|
||||
self.thumb_width = Some(val);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn thumb_height(mut self, val: i32) -> Self {
|
||||
self.thumb_height = Some(val);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue