Struct botapi::gen_types::InlineQueryResultGifBuilder
source · pub struct InlineQueryResultGifBuilder {Show 15 fields
pub tg_type: String,
pub id: String,
pub gif_url: String,
pub gif_width: Option<i64>,
pub gif_height: Option<i64>,
pub gif_duration: Option<i64>,
pub thumbnail_url: String,
pub thumbnail_mime_type: Option<String>,
pub title: Option<String>,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub show_caption_above_media: Option<bool>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
}
Expand description
Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
Fields§
§tg_type: String
Type of the result, must be gif
id: String
Unique identifier for this result, 1-64 bytes
gif_url: String
A valid URL for the GIF file. File size must not exceed 1MB
gif_width: Option<i64>
Optional. Width of the GIF
gif_height: Option<i64>
Optional. Height of the GIF
gif_duration: Option<i64>
Optional. Duration of the GIF in seconds
thumbnail_url: String
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
thumbnail_mime_type: Option<String>
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
title: Option<String>
Optional. Title for the result
caption: Option<String>
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>
Optional. Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media: Option<bool>
Optional. Pass True, if the caption must be shown above the message media
reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>
Optional. Inline keyboard attached to the message
input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>
Optional. Content of the message to be sent instead of the GIF animation
Implementations§
source§impl InlineQueryResultGifBuilder
impl InlineQueryResultGifBuilder
pub fn new(id: String, gif_url: String, thumbnail_url: String) -> Self
sourcepub fn set_gif_url(self, gif_url: String) -> Self
pub fn set_gif_url(self, gif_url: String) -> Self
A valid URL for the GIF file. File size must not exceed 1MB
sourcepub fn set_gif_width(self, gif_width: i64) -> Self
pub fn set_gif_width(self, gif_width: i64) -> Self
Optional. Width of the GIF
sourcepub fn set_gif_height(self, gif_height: i64) -> Self
pub fn set_gif_height(self, gif_height: i64) -> Self
Optional. Height of the GIF
sourcepub fn set_gif_duration(self, gif_duration: i64) -> Self
pub fn set_gif_duration(self, gif_duration: i64) -> Self
Optional. Duration of the GIF in seconds
sourcepub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
pub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
sourcepub fn set_thumbnail_mime_type(self, thumbnail_mime_type: String) -> Self
pub fn set_thumbnail_mime_type(self, thumbnail_mime_type: String) -> Self
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
sourcepub fn set_parse_mode(self, parse_mode: String) -> Self
pub fn set_parse_mode(self, parse_mode: String) -> Self
Optional. Mode for parsing entities in the caption. See formatting options for more details.
sourcepub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
pub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_show_caption_above_media(
self,
show_caption_above_media: bool,
) -> Self
pub fn set_show_caption_above_media( self, show_caption_above_media: bool, ) -> Self
Optional. Pass True, if the caption must be shown above the message media
sourcepub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
Optional. Inline keyboard attached to the message
sourcepub fn set_input_message_content(
self,
input_message_content: InputMessageContent,
) -> Self
pub fn set_input_message_content( self, input_message_content: InputMessageContent, ) -> Self
Optional. Content of the message to be sent instead of the GIF animation
pub fn build(self) -> InlineQueryResultGif
Trait Implementations§
source§impl Clone for InlineQueryResultGifBuilder
impl Clone for InlineQueryResultGifBuilder
source§fn clone(&self) -> InlineQueryResultGifBuilder
fn clone(&self) -> InlineQueryResultGifBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InlineQueryResultGifBuilder
impl Debug for InlineQueryResultGifBuilder
source§impl Default for InlineQueryResultGifBuilder
impl Default for InlineQueryResultGifBuilder
source§fn default() -> InlineQueryResultGifBuilder
fn default() -> InlineQueryResultGifBuilder
source§impl<'de> Deserialize<'de> for InlineQueryResultGifBuilder
impl<'de> Deserialize<'de> for InlineQueryResultGifBuilder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for InlineQueryResultGifBuilder
impl Hash for InlineQueryResultGifBuilder
source§impl Ord for InlineQueryResultGifBuilder
impl Ord for InlineQueryResultGifBuilder
source§fn cmp(&self, other: &InlineQueryResultGifBuilder) -> Ordering
fn cmp(&self, other: &InlineQueryResultGifBuilder) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialOrd for InlineQueryResultGifBuilder
impl PartialOrd for InlineQueryResultGifBuilder
impl Eq for InlineQueryResultGifBuilder
impl StructuralPartialEq for InlineQueryResultGifBuilder
Auto Trait Implementations§
impl Freeze for InlineQueryResultGifBuilder
impl RefUnwindSafe for InlineQueryResultGifBuilder
impl Send for InlineQueryResultGifBuilder
impl Sync for InlineQueryResultGifBuilder
impl Unpin for InlineQueryResultGifBuilder
impl UnwindSafe for InlineQueryResultGifBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.