pub struct InputMediaVideo {Show 13 fields
pub media: InputFile,
pub thumbnail: Option<InputFile>,
pub cover: Option<InputFile>,
pub start_timestamp: Option<Seconds>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub show_caption_above_media: bool,
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§thumbnail: 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.
cover: Option<InputFile>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
start_timestamp: Option<Seconds>Start timestamp for the video in the message
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>>List of special entities that appear in the caption, which can be
specified instead of parse_mode.
show_caption_above_media: boolPass true, if the caption must be shown above the message media.
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: boolPass 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 thumbnail(self, val: InputFile) -> InputMediaVideo
pub fn caption<S>(self, val: S) -> InputMediaVideo
pub fn cover(self, val: InputFile) -> InputMediaVideo
pub fn start_timestamp(self, val: Seconds) -> InputMediaVideo
pub const fn parse_mode(self, val: ParseMode) -> InputMediaVideo
pub fn caption_entities<C>(self, val: C) -> InputMediaVideowhere
C: IntoIterator<Item = MessageEntity>,
pub fn show_caption_above_media(self, val: bool) -> InputMediaVideo
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 (const: unstable) · 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 From<InputMediaVideo> for InputGroupMedia
impl From<InputMediaVideo> for InputGroupMedia
Source§fn from(media: InputMediaVideo) -> InputGroupMedia
fn from(media: InputMediaVideo) -> InputGroupMedia
Source§impl Serialize for InputMediaVideo
impl Serialize for InputMediaVideo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl !Freeze for InputMediaVideo
impl !RefUnwindSafe for InputMediaVideo
impl !UnwindSafe for InputMediaVideo
impl Send for InputMediaVideo
impl Sync for InputMediaVideo
impl Unpin for InputMediaVideo
impl UnsafeUnpin 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<T> Erasable for T
impl<T> Erasable for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more