Struct botapi::gen_types::InlineQueryResultGif
source · pub struct InlineQueryResultGif { /* private fields */ }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.
Implementations§
source§impl InlineQueryResultGif
impl InlineQueryResultGif
pub fn noskip(self) -> NoSkipInlineQueryResultGif
source§impl InlineQueryResultGif
impl InlineQueryResultGif
pub fn new(id: String, gif_url: String, thumbnail_url: String) -> Self
sourcepub fn into_tuple(
self
) -> (String, String, String, Option<i64>, Option<i64>, Option<i64>, String, Option<String>, Option<String>, Option<String>, Option<String>, Option<Vec<MessageEntity>>, Option<InlineKeyboardMarkup>, Option<InputMessageContent>)
pub fn into_tuple( self ) -> (String, String, String, Option<i64>, Option<i64>, Option<i64>, String, Option<String>, Option<String>, Option<String>, Option<String>, Option<Vec<MessageEntity>>, Option<InlineKeyboardMarkup>, Option<InputMessageContent>)
Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (type, id, gif_url, gif_width, gif_height, gif_duration, thumbnail_url, thumbnail_mime_type, title, caption, parse_mode, caption_entities, reply_markup, input_message_content)
sourcepub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>
pub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>
Type of the result, must be gif
sourcepub fn get_tg_type_ref<'a>(&'a self) -> &'a str
pub fn get_tg_type_ref<'a>(&'a self) -> &'a str
Type of the result, must be gif
sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the result, must be gif
sourcepub fn get_id_ref<'a>(&'a self) -> &'a str
pub fn get_id_ref<'a>(&'a self) -> &'a str
Unique identifier for this result, 1-64 bytes
sourcepub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
Unique identifier for this result, 1-64 bytes
sourcepub fn get_gif_url<'a>(&'a self) -> Cow<'a, str>
pub fn get_gif_url<'a>(&'a self) -> Cow<'a, str>
A valid URL for the GIF file. File size must not exceed 1MB
sourcepub fn get_gif_url_ref<'a>(&'a self) -> &'a str
pub fn get_gif_url_ref<'a>(&'a self) -> &'a str
A valid URL for the GIF file. File size must not exceed 1MB
sourcepub fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self
pub fn set_gif_url<'a>(&'a mut self, gif_url: String) -> &'a mut Self
A valid URL for the GIF file. File size must not exceed 1MB
sourcepub fn get_gif_width<'a>(&'a self) -> Option<i64>
pub fn get_gif_width<'a>(&'a self) -> Option<i64>
Optional. Width of the GIF
sourcepub fn get_gif_width_ref<'a>(&'a self) -> Option<i64>
pub fn get_gif_width_ref<'a>(&'a self) -> Option<i64>
Optional. Width of the GIF
sourcepub fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self
pub fn set_gif_width<'a>(&'a mut self, gif_width: Option<i64>) -> &'a mut Self
Optional. Width of the GIF
sourcepub fn get_gif_height<'a>(&'a self) -> Option<i64>
pub fn get_gif_height<'a>(&'a self) -> Option<i64>
Optional. Height of the GIF
sourcepub fn get_gif_height_ref<'a>(&'a self) -> Option<i64>
pub fn get_gif_height_ref<'a>(&'a self) -> Option<i64>
Optional. Height of the GIF
sourcepub fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self
pub fn set_gif_height<'a>(&'a mut self, gif_height: Option<i64>) -> &'a mut Self
Optional. Height of the GIF
sourcepub fn get_gif_duration<'a>(&'a self) -> Option<i64>
pub fn get_gif_duration<'a>(&'a self) -> Option<i64>
Optional. Duration of the GIF in seconds
sourcepub fn get_gif_duration_ref<'a>(&'a self) -> Option<i64>
pub fn get_gif_duration_ref<'a>(&'a self) -> Option<i64>
Optional. Duration of the GIF in seconds
sourcepub fn set_gif_duration<'a>(
&'a mut self,
gif_duration: Option<i64>
) -> &'a mut Self
pub fn set_gif_duration<'a>( &'a mut self, gif_duration: Option<i64> ) -> &'a mut Self
Optional. Duration of the GIF in seconds
sourcepub fn get_thumbnail_url<'a>(&'a self) -> Cow<'a, str>
pub fn get_thumbnail_url<'a>(&'a self) -> Cow<'a, str>
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
sourcepub fn get_thumbnail_url_ref<'a>(&'a self) -> &'a str
pub fn get_thumbnail_url_ref<'a>(&'a self) -> &'a str
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
sourcepub fn set_thumbnail_url<'a>(
&'a mut self,
thumbnail_url: String
) -> &'a mut Self
pub fn set_thumbnail_url<'a>( &'a mut self, thumbnail_url: String ) -> &'a mut Self
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
sourcepub fn get_thumbnail_mime_type<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_thumbnail_mime_type<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
sourcepub fn get_thumbnail_mime_type_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_thumbnail_mime_type_ref<'a>(&'a self) -> Option<&'a str>
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
sourcepub fn set_thumbnail_mime_type<'a>(
&'a mut self,
thumbnail_mime_type: Option<String>
) -> &'a mut Self
pub fn set_thumbnail_mime_type<'a>( &'a mut self, thumbnail_mime_type: Option<String> ) -> &'a mut Self
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
sourcepub fn get_title_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_title_ref<'a>(&'a self) -> Option<&'a str>
Optional. Title for the result
sourcepub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
Optional. Title for the result
sourcepub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_caption<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
sourcepub fn get_caption_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_caption_ref<'a>(&'a self) -> Option<&'a str>
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
sourcepub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
sourcepub fn get_parse_mode<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_parse_mode<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Mode for parsing entities in the caption. See formatting options for more details.
sourcepub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_parse_mode_ref<'a>(&'a self) -> Option<&'a str>
Optional. Mode for parsing entities in the caption. See formatting options for more details.
sourcepub fn set_parse_mode<'a>(
&'a mut self,
parse_mode: Option<String>
) -> &'a mut Self
pub fn set_parse_mode<'a>( &'a mut self, parse_mode: Option<String> ) -> &'a mut Self
Optional. Mode for parsing entities in the caption. See formatting options for more details.
sourcepub fn get_caption_entities<'a>(&'a self) -> Option<Cow<'a, Vec<MessageEntity>>>
pub fn get_caption_entities<'a>(&'a self) -> Option<Cow<'a, Vec<MessageEntity>>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn get_caption_entities_ref<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
pub fn get_caption_entities_ref<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_caption_entities<'a>(
&'a mut self,
caption_entities: Option<Vec<MessageEntity>>
) -> &'a mut Self
pub fn set_caption_entities<'a>( &'a mut self, caption_entities: Option<Vec<MessageEntity>> ) -> &'a mut Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>
pub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>
Optional. Inline keyboard attached to the message
sourcepub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
Optional. Inline keyboard attached to the message
sourcepub fn set_reply_markup<'a>(
&'a mut self,
reply_markup: Option<InlineKeyboardMarkup>
) -> &'a mut Self
pub fn set_reply_markup<'a>( &'a mut self, reply_markup: Option<InlineKeyboardMarkup> ) -> &'a mut Self
Optional. Inline keyboard attached to the message
sourcepub fn get_input_message_content<'a>(
&'a self
) -> Option<Cow<'a, InputMessageContent>>
pub fn get_input_message_content<'a>( &'a self ) -> Option<Cow<'a, InputMessageContent>>
Optional. Content of the message to be sent instead of the GIF animation
sourcepub fn get_input_message_content_ref<'a>(
&'a self
) -> Option<&'a InputMessageContent>
pub fn get_input_message_content_ref<'a>( &'a self ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the GIF animation
sourcepub fn set_input_message_content<'a>(
&'a mut self,
input_message_content: Option<InputMessageContent>
) -> &'a mut Self
pub fn set_input_message_content<'a>( &'a mut self, input_message_content: Option<InputMessageContent> ) -> &'a mut Self
Optional. Content of the message to be sent instead of the GIF animation
Trait Implementations§
source§impl Clone for InlineQueryResultGif
impl Clone for InlineQueryResultGif
source§fn clone(&self) -> InlineQueryResultGif
fn clone(&self) -> InlineQueryResultGif
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more