pub struct InputMediaDocument {
pub media: InputFile,
pub thumbnail: 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.
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.
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) -> InputMediaDocument
pub fn media(self, val: InputFile) -> InputMediaDocument
pub fn thumbnail(self, val: InputFile) -> InputMediaDocument
pub fn caption<S>(self, val: S) -> InputMediaDocument
pub const fn parse_mode(self, val: ParseMode) -> InputMediaDocument
pub fn caption_entities<C>(self, val: C) -> InputMediaDocumentwhere
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 moreSource§impl Debug for InputMediaDocument
impl Debug for InputMediaDocument
Source§impl Serialize for InputMediaDocument
impl Serialize for InputMediaDocument
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 InputMediaDocument
impl !RefUnwindSafe for InputMediaDocument
impl Send for InputMediaDocument
impl Sync for InputMediaDocument
impl Unpin for InputMediaDocument
impl !UnwindSafe for InputMediaDocument
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> 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