Struct tg_botapi::api::InlineQueryResultPhoto
source · pub struct InlineQueryResultPhoto {
pub id: String,
pub photo_url: String,
pub thumb_url: String,
pub photo_width: Option<i64>,
pub photo_height: Option<i64>,
pub title: Option<String>,
pub description: Option<String>,
pub caption: Option<String>,
pub parse_mode: Option<ParseMode>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
}
Expand description
Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
Fields§
§id: String
Unique identifier for this result, 1-64 bytes
photo_url: String
A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
thumb_url: String
URL of the thumbnail for the photo
photo_width: Option<i64>
Width of the photo
photo_height: Option<i64>
Height of the photo
title: Option<String>
Title for the result
description: Option<String>
Short description of the result
Caption of the photo to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>
Mode for parsing entities in the photo caption. See formatting options for more details.
List of special entities that appear in the caption, which can be specified instead of parse_mode
reply_markup: Option<InlineKeyboardMarkup>
Inline keyboard attached to the message
input_message_content: Option<InputMessageContent>
Content of the message to be sent instead of the photo
Implementations§
source§impl InlineQueryResultPhoto
impl InlineQueryResultPhoto
pub fn with_photo_width(self, photo_width: i64) -> Self
pub fn with_photo_height(self, photo_height: i64) -> Self
pub fn with_title(self, title: String) -> Self
pub fn with_description(self, description: String) -> Self
pub fn with_parse_mode(self, parse_mode: ParseMode) -> Self
pub fn with_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn with_input_message_content(
self,
input_message_content: InputMessageContent
) -> Self
Trait Implementations§
source§impl Clone for InlineQueryResultPhoto
impl Clone for InlineQueryResultPhoto
source§fn clone(&self) -> InlineQueryResultPhoto
fn clone(&self) -> InlineQueryResultPhoto
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more