Struct botapi::gen_types::InlineQueryResultVideoBuilder
source · pub struct InlineQueryResultVideoBuilder {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: String
Type of the result, must be video
id: String
Unique identifier for this result, 1-64 bytes
video_url: String
A valid URL for the embedded video player or video file
mime_type: String
MIME type of the content of the video URL, “text/html” or “video/mp4”
thumbnail_url: String
URL of the thumbnail (JPEG only) for the video
title: String
Title 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 InlineQueryResultVideoBuilder
impl InlineQueryResultVideoBuilder
pub fn new( id: String, video_url: String, mime_type: String, thumbnail_url: String, title: String, ) -> Self
sourcepub fn set_video_url(self, video_url: String) -> Self
pub fn set_video_url(self, video_url: String) -> Self
A valid URL for the embedded video player or video file
sourcepub fn set_mime_type(self, mime_type: String) -> Self
pub fn set_mime_type(self, mime_type: String) -> Self
MIME type of the content of the video URL, “text/html” or “video/mp4”
sourcepub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
pub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
URL of the thumbnail (JPEG only) for the video
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption of the video 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 video 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_video_width(self, video_width: i64) -> Self
pub fn set_video_width(self, video_width: i64) -> Self
Optional. Video width
sourcepub fn set_video_height(self, video_height: i64) -> Self
pub fn set_video_height(self, video_height: i64) -> Self
Optional. Video height
sourcepub fn set_video_duration(self, video_duration: i64) -> Self
pub fn set_video_duration(self, video_duration: i64) -> Self
Optional. Video duration in seconds
sourcepub fn set_description(self, description: String) -> Self
pub fn set_description(self, description: String) -> Self
Optional. Short description of the result
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 video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
pub fn build(self) -> InlineQueryResultVideo
Trait Implementations§
source§impl Clone for InlineQueryResultVideoBuilder
impl Clone for InlineQueryResultVideoBuilder
source§fn clone(&self) -> InlineQueryResultVideoBuilder
fn clone(&self) -> InlineQueryResultVideoBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for InlineQueryResultVideoBuilder
impl Default for InlineQueryResultVideoBuilder
source§fn default() -> InlineQueryResultVideoBuilder
fn default() -> InlineQueryResultVideoBuilder
source§impl<'de> Deserialize<'de> for InlineQueryResultVideoBuilder
impl<'de> Deserialize<'de> for InlineQueryResultVideoBuilder
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 InlineQueryResultVideoBuilder
impl Hash for InlineQueryResultVideoBuilder
source§impl Ord for InlineQueryResultVideoBuilder
impl Ord for InlineQueryResultVideoBuilder
source§fn cmp(&self, other: &InlineQueryResultVideoBuilder) -> Ordering
fn cmp(&self, other: &InlineQueryResultVideoBuilder) -> 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 InlineQueryResultVideoBuilder
impl PartialEq for InlineQueryResultVideoBuilder
source§fn eq(&self, other: &InlineQueryResultVideoBuilder) -> bool
fn eq(&self, other: &InlineQueryResultVideoBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InlineQueryResultVideoBuilder
impl PartialOrd for InlineQueryResultVideoBuilder
source§fn partial_cmp(&self, other: &InlineQueryResultVideoBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineQueryResultVideoBuilder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for InlineQueryResultVideoBuilder
impl StructuralPartialEq for InlineQueryResultVideoBuilder
Auto Trait Implementations§
impl Freeze for InlineQueryResultVideoBuilder
impl RefUnwindSafe for InlineQueryResultVideoBuilder
impl Send for InlineQueryResultVideoBuilder
impl Sync for InlineQueryResultVideoBuilder
impl Unpin for InlineQueryResultVideoBuilder
impl UnwindSafe for InlineQueryResultVideoBuilder
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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.