pub struct InlineQueryResultVideo {Show 16 fields
pub tg_type: String,
pub id: String,
pub video_url: String,
pub mime_type: String,
pub thumbnail_url: String,
pub title: String,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub show_caption_above_media: Option<bool>,
pub video_width: Option<i64>,
pub video_height: Option<i64>,
pub video_duration: Option<i64>,
pub description: Option<String>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>,
}Expand description
Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
Fields§
§tg_type: StringType of the result, must be video
id: StringUnique identifier for this result, 1-64 bytes
video_url: StringA valid URL for the embedded video player or video file
mime_type: StringMIME type of the content of the video URL, “text/html” or “video/mp4”
thumbnail_url: StringURL of the thumbnail (JPEG only) for the video
title: StringTitle for the result
caption: Option<String>Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>Optional. Mode for parsing entities in the video 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
video_width: Option<i64>Optional. Video width
video_height: Option<i64>Optional. Video height
video_duration: Option<i64>Optional. Video duration in seconds
description: Option<String>Optional. Short description of the result
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 video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
Implementations§
Source§impl InlineQueryResultVideo
impl InlineQueryResultVideo
pub fn noskip(self) -> NoSkipInlineQueryResultVideo
Source§impl InlineQueryResultVideo
impl InlineQueryResultVideo
pub fn new( id: String, video_url: String, mime_type: String, thumbnail_url: String, title: String, ) -> Self
Sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the result, must be video
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 video
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_video_url<'a>(&'a self) -> &'a str
pub fn get_video_url<'a>(&'a self) -> &'a str
A valid URL for the embedded video player or video file
Sourcepub fn set_video_url<'a>(&'a mut self, video_url: String) -> &'a mut Self
pub fn set_video_url<'a>(&'a mut self, video_url: String) -> &'a mut Self
A valid URL for the embedded video player or video file
Sourcepub fn get_mime_type<'a>(&'a self) -> &'a str
pub fn get_mime_type<'a>(&'a self) -> &'a str
MIME type of the content of the video URL, “text/html” or “video/mp4”
Sourcepub fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self
pub fn set_mime_type<'a>(&'a mut self, mime_type: String) -> &'a mut Self
MIME type of the content of the video URL, “text/html” or “video/mp4”
Sourcepub fn get_thumbnail_url<'a>(&'a self) -> &'a str
pub fn get_thumbnail_url<'a>(&'a self) -> &'a str
URL of the thumbnail (JPEG only) for the video
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 thumbnail (JPEG only) for the video
Sourcepub fn get_caption<'a>(&'a self) -> Option<&'a str>
pub fn get_caption<'a>(&'a self) -> Option<&'a str>
Optional. Caption of the video 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 video to be sent, 0-1024 characters after entities parsing
Sourcepub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
Optional. Mode for parsing entities in the video 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 video caption. See formatting options for more details.
Sourcepub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
pub fn get_caption_entities<'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_show_caption_above_media<'a>(&'a self) -> Option<bool>
pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>
Optional. Pass True, if the caption must be shown above the message media
Sourcepub fn set_show_caption_above_media<'a>(
&'a mut self,
show_caption_above_media: Option<bool>,
) -> &'a mut Self
pub fn set_show_caption_above_media<'a>( &'a mut self, show_caption_above_media: Option<bool>, ) -> &'a mut Self
Optional. Pass True, if the caption must be shown above the message media
Sourcepub fn get_video_width<'a>(&'a self) -> Option<i64>
pub fn get_video_width<'a>(&'a self) -> Option<i64>
Optional. Video width
Sourcepub fn set_video_width<'a>(
&'a mut self,
video_width: Option<i64>,
) -> &'a mut Self
pub fn set_video_width<'a>( &'a mut self, video_width: Option<i64>, ) -> &'a mut Self
Optional. Video width
Sourcepub fn get_video_height<'a>(&'a self) -> Option<i64>
pub fn get_video_height<'a>(&'a self) -> Option<i64>
Optional. Video height
Sourcepub fn set_video_height<'a>(
&'a mut self,
video_height: Option<i64>,
) -> &'a mut Self
pub fn set_video_height<'a>( &'a mut self, video_height: Option<i64>, ) -> &'a mut Self
Optional. Video height
Sourcepub fn get_video_duration<'a>(&'a self) -> Option<i64>
pub fn get_video_duration<'a>(&'a self) -> Option<i64>
Optional. Video duration in seconds
Sourcepub fn set_video_duration<'a>(
&'a mut self,
video_duration: Option<i64>,
) -> &'a mut Self
pub fn set_video_duration<'a>( &'a mut self, video_duration: Option<i64>, ) -> &'a mut Self
Optional. Video duration in seconds
Sourcepub fn get_description<'a>(&'a self) -> Option<&'a str>
pub fn get_description<'a>(&'a self) -> Option<&'a str>
Optional. Short description of the result
Sourcepub fn set_description<'a>(
&'a mut self,
description: Option<String>,
) -> &'a mut Self
pub fn set_description<'a>( &'a mut self, description: Option<String>, ) -> &'a mut Self
Optional. Short description of the result
Sourcepub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup<'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<&'a InputMessageContent>
pub fn get_input_message_content<'a>( &'a self, ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
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 video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
Trait Implementations§
Source§impl Clone for InlineQueryResultVideo
impl Clone for InlineQueryResultVideo
Source§fn clone(&self) -> InlineQueryResultVideo
fn clone(&self) -> InlineQueryResultVideo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InlineQueryResultVideo
impl Debug for InlineQueryResultVideo
Source§impl Default for InlineQueryResultVideo
impl Default for InlineQueryResultVideo
Source§fn default() -> InlineQueryResultVideo
fn default() -> InlineQueryResultVideo
Source§impl<'de> Deserialize<'de> for InlineQueryResultVideo
impl<'de> Deserialize<'de> for InlineQueryResultVideo
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 From<BoxWrapper<Box<InlineQueryResultVideo>>> for InlineQueryResultVideo
impl From<BoxWrapper<Box<InlineQueryResultVideo>>> for InlineQueryResultVideo
Source§fn from(t: BoxWrapper<Box<InlineQueryResultVideo>>) -> Self
fn from(t: BoxWrapper<Box<InlineQueryResultVideo>>) -> Self
Source§impl From<BoxWrapper<Unbox<InlineQueryResultVideo>>> for InlineQueryResultVideo
impl From<BoxWrapper<Unbox<InlineQueryResultVideo>>> for InlineQueryResultVideo
Source§fn from(t: BoxWrapper<Unbox<InlineQueryResultVideo>>) -> Self
fn from(t: BoxWrapper<Unbox<InlineQueryResultVideo>>) -> Self
Source§impl From<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo
impl From<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo
Source§fn from(t: NoSkipInlineQueryResultVideo) -> Self
fn from(t: NoSkipInlineQueryResultVideo) -> Self
Source§impl Hash for InlineQueryResultVideo
impl Hash for InlineQueryResultVideo
Source§impl Into<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo
impl Into<NoSkipInlineQueryResultVideo> for InlineQueryResultVideo
Source§fn into(self) -> NoSkipInlineQueryResultVideo
fn into(self) -> NoSkipInlineQueryResultVideo
Source§impl Ord for InlineQueryResultVideo
impl Ord for InlineQueryResultVideo
Source§fn cmp(&self, other: &InlineQueryResultVideo) -> Ordering
fn cmp(&self, other: &InlineQueryResultVideo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for InlineQueryResultVideo
impl PartialEq for InlineQueryResultVideo
Source§impl PartialOrd for InlineQueryResultVideo
impl PartialOrd for InlineQueryResultVideo
Source§impl Serialize for InlineQueryResultVideo
impl Serialize for InlineQueryResultVideo
impl Eq for InlineQueryResultVideo
impl StructuralPartialEq for InlineQueryResultVideo
Auto Trait Implementations§
impl Freeze for InlineQueryResultVideo
impl RefUnwindSafe for InlineQueryResultVideo
impl Send for InlineQueryResultVideo
impl Sync for InlineQueryResultVideo
impl Unpin for InlineQueryResultVideo
impl UnwindSafe for InlineQueryResultVideo
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§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.