Enum telegram_types::bot::types::InputMedia [−][src]
The content of a media message to be sent.
Variants
Fields of Video
media: FileToSend
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.
Optional. Caption of the photo to be sent, 0-200 characters
parse_mode: Option<ParseMode>
Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
width: Option<i32>
height: Option<i32>
duration: Option<i32>
supports_streaming: Option<bool>
Pass True, if the uploaded video is suitable for streaming
Fields of Photo
media: FileToSend
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.
Optional. Caption of the photo to be sent, 0-200 characters
parse_mode: Option<ParseMode>
Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Fields of Animation
media: FileToSend
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.
thumb: Option<InputFile>
Thumbnail of the file sent.
The thumbnail should be in JPEG format and less than 200 kB in size.
A thumbnail‘s width and height should not exceed 90.
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>.
parse_mode: Option<ParseMode>
width: Option<i32>
height: Option<i32>
duration: Option<i32>
Fields of Audio
Fields of Document
Unknown upstream data type.
Trait Implementations
impl Clone for InputMedia
[src]
fn clone(&self) -> InputMedia
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for InputMedia
[src]
impl<'de> Deserialize<'de> for InputMedia
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for InputMedia
[src]
impl PartialEq<InputMedia> for InputMedia
[src]
fn eq(&self, other: &InputMedia) -> bool
[src]
fn ne(&self, other: &InputMedia) -> bool
[src]
impl Serialize for InputMedia
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for InputMedia
[src]
impl StructuralPartialEq for InputMedia
[src]
Auto Trait Implementations
impl RefUnwindSafe for InputMedia
impl Send for InputMedia
impl Sync for InputMedia
impl Unpin for InputMedia
impl UnwindSafe for InputMedia
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,