Struct botapi::gen_types::InlineQueryResultPhotoBuilder
source · pub struct InlineQueryResultPhotoBuilder { /* private fields */ }
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.
Implementations§
source§impl InlineQueryResultPhotoBuilder
impl InlineQueryResultPhotoBuilder
pub fn new(id: String, photo_url: String, thumbnail_url: String) -> Self
sourcepub fn set_photo_url(self, photo_url: String) -> Self
pub fn set_photo_url(self, photo_url: String) -> Self
A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
sourcepub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
pub fn set_thumbnail_url(self, thumbnail_url: String) -> Self
URL of the thumbnail for the photo
sourcepub fn set_photo_width(self, photo_width: i64) -> Self
pub fn set_photo_width(self, photo_width: i64) -> Self
Optional. Width of the photo
sourcepub fn set_photo_height(self, photo_height: i64) -> Self
pub fn set_photo_height(self, photo_height: i64) -> Self
Optional. Height of the photo
sourcepub fn set_description(self, description: String) -> Self
pub fn set_description(self, description: String) -> Self
Optional. Short description of the result
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
sourcepub fn set_parse_mode(self, parse_mode: String) -> Self
pub fn set_parse_mode(self, parse_mode: String) -> Self
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
sourcepub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
pub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
Optional. Inline keyboard attached to the message
sourcepub fn set_input_message_content(
self,
input_message_content: InputMessageContent
) -> Self
pub fn set_input_message_content( self, input_message_content: InputMessageContent ) -> Self
Optional. Content of the message to be sent instead of the photo
pub fn build(self) -> InlineQueryResultPhoto
Trait Implementations§
source§impl Clone for InlineQueryResultPhotoBuilder
impl Clone for InlineQueryResultPhotoBuilder
source§fn clone(&self) -> InlineQueryResultPhotoBuilder
fn clone(&self) -> InlineQueryResultPhotoBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more