Struct tg_flows::InputMediaDocument
source · pub struct InputMediaDocument {
pub media: InputFile,
pub thumb: Option<InputFile>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub disable_content_type_detection: Option<bool>,
}Expand description
Represents a general file to be sent.
Fields§
§media: InputFileFile 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 document 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.
disable_content_type_detection: Option<bool>Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album.
Implementations§
source§impl InputMediaDocument
impl InputMediaDocument
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) -> Selfwhere S: Into<String>,
pub const fn parse_mode(self, val: ParseMode) -> Self
pub fn caption_entities<C>(self, val: C) -> Selfwhere C: IntoIterator<Item = MessageEntity>,
Trait Implementations§
source§impl Clone for InputMediaDocument
impl Clone for InputMediaDocument
source§fn clone(&self) -> InputMediaDocument
fn clone(&self) -> InputMediaDocument
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more