pub struct InputMediaAnimation {
pub media: InputFile,
pub thumb: Option<InputFile>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub width: Option<u16>,
pub height: Option<u16>,
pub duration: Option<u16>,
pub has_spoiler: bool,
}
Expand description
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
Fields§
§media: InputFile
File to send.
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 animation 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
.
width: Option<u16>
Animation width.
height: Option<u16>
Animation height.
duration: Option<u16>
Animation duration.
has_spoiler: bool
Pass true
if the animation needs to be covered with a spoiler
animation.
Implementations§
Source§impl InputMediaAnimation
impl InputMediaAnimation
pub const fn new(media: InputFile) -> Self
pub fn media(self, val: InputFile) -> Self
pub fn thumb(self, val: InputFile) -> Self
pub fn caption<S>(self, val: S) -> Self
pub const fn parse_mode(self, val: ParseMode) -> Self
pub fn caption_entities<C>(self, val: C) -> Selfwhere
C: IntoIterator<Item = MessageEntity>,
pub const fn width(self, val: u16) -> Self
pub const fn height(self, val: u16) -> Self
pub const fn duration(self, val: u16) -> Self
Sourcepub fn spoiler(self) -> Self
pub fn spoiler(self) -> Self
Sets has_spoiler
to true
.
Trait Implementations§
Source§impl Clone for InputMediaAnimation
impl Clone for InputMediaAnimation
Source§fn clone(&self) -> InputMediaAnimation
fn clone(&self) -> InputMediaAnimation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InputMediaAnimation
impl Debug for InputMediaAnimation
Auto Trait Implementations§
impl !Freeze for InputMediaAnimation
impl !RefUnwindSafe for InputMediaAnimation
impl Send for InputMediaAnimation
impl Sync for InputMediaAnimation
impl Unpin for InputMediaAnimation
impl !UnwindSafe for InputMediaAnimation
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
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