Struct teloxide::types::InputMediaVideo
source · pub struct InputMediaVideo {
pub media: InputFile,
pub thumb: Option<InputFile>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity, Global>>,
pub width: Option<u16>,
pub height: Option<u16>,
pub duration: Option<u16>,
pub supports_streaming: Option<bool>,
pub has_spoiler: bool,
}
Expand description
Represents a video to be sent.
Fields§
§media: InputFile
§thumb: Option<InputFile>
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.
caption: Option<String>
Caption of the video to be sent, 0-1024 characters.
parse_mode: Option<ParseMode>
Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
caption_entities: Option<Vec<MessageEntity, Global>>
List of special entities that appear in the caption, which can be
specified instead of parse_mode
.
width: Option<u16>
Video width.
height: Option<u16>
Video height.
duration: Option<u16>
Video duration.
supports_streaming: Option<bool>
Pass true
, if the uploaded video is suitable for streaming.
has_spoiler: bool
Pass true
if the video needs to be covered with a spoiler animation.
Implementations§
source§impl InputMediaVideo
impl InputMediaVideo
pub const fn new(media: InputFile) -> InputMediaVideo
pub fn media(self, val: InputFile) -> InputMediaVideo
pub fn thumb(self, val: InputFile) -> InputMediaVideo
pub fn caption<S>(self, val: S) -> InputMediaVideowhere
S: Into<String>,
pub const fn parse_mode(self, val: ParseMode) -> InputMediaVideo
pub fn caption_entities<C>(self, val: C) -> InputMediaVideowhere
C: IntoIterator<Item = MessageEntity>,
pub const fn width(self, val: u16) -> InputMediaVideo
pub const fn height(self, val: u16) -> InputMediaVideo
pub const fn duration(self, val: u16) -> InputMediaVideo
pub const fn supports_streaming(self, val: bool) -> InputMediaVideo
sourcepub fn spoiler(self) -> InputMediaVideo
pub fn spoiler(self) -> InputMediaVideo
Sets has_spoiler
to true
.
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 more