Struct telegram_bot_api::types::InputMediaPhoto
source · [−]pub struct InputMediaPhoto {
pub media: InputFile,
pub caption: Option<String>,
pub parse_mode: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
}
Expand description
Represents a photo to be sent.
Fields
media: InputFile
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. More information on Sending Files »
caption: Option<String>
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
parse_mode: Option<String>
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
Implementations
Trait Implementations
sourceimpl Clone for InputMediaPhoto
impl Clone for InputMediaPhoto
sourcefn clone(&self) -> InputMediaPhoto
fn clone(&self) -> InputMediaPhoto
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for InputMediaPhoto
impl Debug for InputMediaPhoto
sourceimpl<'de> Deserialize<'de> for InputMediaPhoto
impl<'de> Deserialize<'de> for InputMediaPhoto
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for InputMediaPhoto
impl Serialize for InputMediaPhoto
Auto Trait Implementations
impl RefUnwindSafe for InputMediaPhoto
impl Send for InputMediaPhoto
impl Sync for InputMediaPhoto
impl Unpin for InputMediaPhoto
impl UnwindSafe for InputMediaPhoto
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more