Struct teloxide::types::InputMediaPhoto
source · pub struct InputMediaPhoto {
pub media: InputFile,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity, Global>>,
pub has_spoiler: bool,
}
Expand description
Represents a photo to be sent.
Fields§
§media: InputFile
File to send.
Caption of the photo 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.
List of special entities that appear in the caption, which can be
specified instead of parse_mode
.
has_spoiler: bool
Pass true
if the photo needs to be covered with a spoiler animation.
Implementations§
source§impl InputMediaPhoto
impl InputMediaPhoto
pub const fn new(media: InputFile) -> InputMediaPhoto
pub fn media(self, val: InputFile) -> InputMediaPhoto
pub const fn parse_mode(self, val: ParseMode) -> InputMediaPhoto
sourcepub fn spoiler(self) -> InputMediaPhoto
pub fn spoiler(self) -> InputMediaPhoto
Sets has_spoiler
to true
.
Trait Implementations§
source§impl Clone for InputMediaPhoto
impl Clone for InputMediaPhoto
source§fn clone(&self) -> InputMediaPhoto
fn clone(&self) -> InputMediaPhoto
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InputMediaPhoto
impl Debug for InputMediaPhoto
source§impl Serialize for InputMediaPhoto
impl Serialize for InputMediaPhoto
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,
Serialize this value into the given Serde serializer. Read more