pub struct InputMediaVideo {Show 14 fields
pub tg_type: String,
pub media: Option<InputFile>,
pub thumbnail: Option<String>,
pub cover: Option<String>,
pub start_timestamp: Option<i64>,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub show_caption_above_media: Option<bool>,
pub width: Option<i64>,
pub height: Option<i64>,
pub duration: Option<i64>,
pub supports_streaming: Option<bool>,
pub has_spoiler: Option<bool>,
}Expand description
Represents a video to be sent.
Fields§
§tg_type: StringType of the result, must be video
media: Option<InputFile>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
thumbnail: Option<String>Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
cover: Option<String>Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
start_timestamp: Option<i64>Optional. Start timestamp for the video in the message
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
width: Option<i64>Optional. Video width
height: Option<i64>Optional. Video height
duration: Option<i64>Optional. Video duration in seconds
supports_streaming: Option<bool>Optional. Pass True if the uploaded video is suitable for streaming
has_spoiler: Option<bool>Optional. Pass True if the video needs to be covered with a spoiler animation
Implementations§
Source§impl InputMediaVideo
impl InputMediaVideo
pub fn noskip(self) -> NoSkipInputMediaVideo
Source§impl InputMediaVideo
impl InputMediaVideo
pub fn new(media: Option<InputFile>) -> 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 get_media<'a>(&'a self) -> &'a Option<InputFile>
pub fn get_media<'a>(&'a self) -> &'a Option<InputFile>
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self
pub fn set_media<'a>(&'a mut self, media: Option<InputFile>) -> &'a mut Self
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn get_thumbnail<'a>(&'a self) -> Option<&'a str>
pub fn get_thumbnail<'a>(&'a self) -> Option<&'a str>
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn set_thumbnail<'a>(
&'a mut self,
thumbnail: Option<String>,
) -> &'a mut Self
pub fn set_thumbnail<'a>( &'a mut self, thumbnail: Option<String>, ) -> &'a mut Self
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn get_cover<'a>(&'a self) -> Option<&'a str>
pub fn get_cover<'a>(&'a self) -> Option<&'a str>
Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self
pub fn set_cover<'a>(&'a mut self, cover: Option<String>) -> &'a mut Self
Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Sourcepub fn get_start_timestamp<'a>(&'a self) -> Option<i64>
pub fn get_start_timestamp<'a>(&'a self) -> Option<i64>
Optional. Start timestamp for the video in the message
Sourcepub fn set_start_timestamp<'a>(
&'a mut self,
start_timestamp: Option<i64>,
) -> &'a mut Self
pub fn set_start_timestamp<'a>( &'a mut self, start_timestamp: Option<i64>, ) -> &'a mut Self
Optional. Start timestamp for the video in the message
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_height<'a>(&'a self) -> Option<i64>
pub fn get_height<'a>(&'a self) -> Option<i64>
Optional. Video height
Sourcepub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self
pub fn set_height<'a>(&'a mut self, height: Option<i64>) -> &'a mut Self
Optional. Video height
Sourcepub fn get_duration<'a>(&'a self) -> Option<i64>
pub fn get_duration<'a>(&'a self) -> Option<i64>
Optional. Video duration in seconds
Sourcepub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self
pub fn set_duration<'a>(&'a mut self, duration: Option<i64>) -> &'a mut Self
Optional. Video duration in seconds
Sourcepub fn get_supports_streaming<'a>(&'a self) -> Option<bool>
pub fn get_supports_streaming<'a>(&'a self) -> Option<bool>
Optional. Pass True if the uploaded video is suitable for streaming
Sourcepub fn set_supports_streaming<'a>(
&'a mut self,
supports_streaming: Option<bool>,
) -> &'a mut Self
pub fn set_supports_streaming<'a>( &'a mut self, supports_streaming: Option<bool>, ) -> &'a mut Self
Optional. Pass True if the uploaded video is suitable for streaming
Sourcepub fn get_has_spoiler<'a>(&'a self) -> Option<bool>
pub fn get_has_spoiler<'a>(&'a self) -> Option<bool>
Optional. Pass True if the video needs to be covered with a spoiler animation
Sourcepub fn set_has_spoiler<'a>(
&'a mut self,
has_spoiler: Option<bool>,
) -> &'a mut Self
pub fn set_has_spoiler<'a>( &'a mut self, has_spoiler: Option<bool>, ) -> &'a mut Self
Optional. Pass True if the video needs to be covered with a spoiler animation
Trait Implementations§
Source§impl Clone for InputMediaVideo
impl Clone for InputMediaVideo
Source§fn clone(&self) -> InputMediaVideo
fn clone(&self) -> InputMediaVideo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputMediaVideo
impl Debug for InputMediaVideo
Source§impl Default for InputMediaVideo
impl Default for InputMediaVideo
Source§fn default() -> InputMediaVideo
fn default() -> InputMediaVideo
Source§impl<'de> Deserialize<'de> for InputMediaVideo
impl<'de> Deserialize<'de> for InputMediaVideo
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<InputMediaVideo>>> for InputMediaVideo
impl From<BoxWrapper<Box<InputMediaVideo>>> for InputMediaVideo
Source§fn from(t: BoxWrapper<Box<InputMediaVideo>>) -> Self
fn from(t: BoxWrapper<Box<InputMediaVideo>>) -> Self
Source§impl From<BoxWrapper<Unbox<InputMediaVideo>>> for InputMediaVideo
impl From<BoxWrapper<Unbox<InputMediaVideo>>> for InputMediaVideo
Source§fn from(t: BoxWrapper<Unbox<InputMediaVideo>>) -> Self
fn from(t: BoxWrapper<Unbox<InputMediaVideo>>) -> Self
Source§impl From<NoSkipInputMediaVideo> for InputMediaVideo
impl From<NoSkipInputMediaVideo> for InputMediaVideo
Source§fn from(t: NoSkipInputMediaVideo) -> Self
fn from(t: NoSkipInputMediaVideo) -> Self
Source§impl Hash for InputMediaVideo
impl Hash for InputMediaVideo
Source§impl Into<NoSkipInputMediaVideo> for InputMediaVideo
impl Into<NoSkipInputMediaVideo> for InputMediaVideo
Source§fn into(self) -> NoSkipInputMediaVideo
fn into(self) -> NoSkipInputMediaVideo
Source§impl Ord for InputMediaVideo
impl Ord for InputMediaVideo
Source§fn cmp(&self, other: &InputMediaVideo) -> Ordering
fn cmp(&self, other: &InputMediaVideo) -> 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 InputMediaVideo
impl PartialEq for InputMediaVideo
Source§impl PartialOrd for InputMediaVideo
impl PartialOrd for InputMediaVideo
Source§impl Serialize for InputMediaVideo
impl Serialize for InputMediaVideo
impl Eq for InputMediaVideo
impl StructuralPartialEq for InputMediaVideo
Auto Trait Implementations§
impl Freeze for InputMediaVideo
impl RefUnwindSafe for InputMediaVideo
impl Send for InputMediaVideo
impl Sync for InputMediaVideo
impl Unpin for InputMediaVideo
impl UnsafeUnpin for InputMediaVideo
impl UnwindSafe for InputMediaVideo
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.