Struct botapi::gen_types::InlineQueryResultPhoto
source · pub struct InlineQueryResultPhoto {Show 14 fields
pub tg_type: String,
pub id: String,
pub photo_url: String,
pub thumbnail_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<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub show_caption_above_media: Option<bool>,
pub reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>,
pub input_message_content: Option<BoxWrapper<Unbox<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§
§tg_type: String
Type of the result, must be photo
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
thumbnail_url: String
URL of the thumbnail for the photo
photo_width: Option<i64>
Optional. Width of the photo
photo_height: Option<i64>
Optional. Height of the photo
title: Option<String>
Optional. Title for the result
description: Option<String>
Optional. Short description of the result
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
show_caption_above_media: Option<bool>
Optional. Pass True, if the caption must be shown above the message media
reply_markup: Option<BoxWrapper<Unbox<InlineKeyboardMarkup>>>
Optional. Inline keyboard attached to the message
input_message_content: Option<BoxWrapper<Unbox<InputMessageContent>>>
Optional. Content of the message to be sent instead of the photo
Implementations§
source§impl InlineQueryResultPhoto
impl InlineQueryResultPhoto
pub fn noskip(self) -> NoSkipInlineQueryResultPhoto
source§impl InlineQueryResultPhoto
impl InlineQueryResultPhoto
pub fn new(id: String, photo_url: String, thumbnail_url: String) -> Self
sourcepub fn get_tg_type<'a>(&'a self) -> &'a str
pub fn get_tg_type<'a>(&'a self) -> &'a str
Type of the result, must be photo
sourcepub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
pub fn set_tg_type<'a>(&'a mut self, tg_type: String) -> &'a mut Self
Type of the result, must be photo
sourcepub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
pub fn set_id<'a>(&'a mut self, id: String) -> &'a mut Self
Unique identifier for this result, 1-64 bytes
sourcepub fn get_photo_url<'a>(&'a self) -> &'a str
pub fn get_photo_url<'a>(&'a self) -> &'a str
A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
sourcepub fn set_photo_url<'a>(&'a mut self, photo_url: String) -> &'a mut Self
pub fn set_photo_url<'a>(&'a mut self, photo_url: String) -> &'a mut Self
A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
sourcepub fn get_thumbnail_url<'a>(&'a self) -> &'a str
pub fn get_thumbnail_url<'a>(&'a self) -> &'a str
URL of the thumbnail for the photo
sourcepub fn set_thumbnail_url<'a>(
&'a mut self,
thumbnail_url: String,
) -> &'a mut Self
pub fn set_thumbnail_url<'a>( &'a mut self, thumbnail_url: String, ) -> &'a mut Self
URL of the thumbnail for the photo
sourcepub fn get_photo_width<'a>(&'a self) -> Option<i64>
pub fn get_photo_width<'a>(&'a self) -> Option<i64>
Optional. Width of the photo
sourcepub fn set_photo_width<'a>(
&'a mut self,
photo_width: Option<i64>,
) -> &'a mut Self
pub fn set_photo_width<'a>( &'a mut self, photo_width: Option<i64>, ) -> &'a mut Self
Optional. Width of the photo
sourcepub fn get_photo_height<'a>(&'a self) -> Option<i64>
pub fn get_photo_height<'a>(&'a self) -> Option<i64>
Optional. Height of the photo
sourcepub fn set_photo_height<'a>(
&'a mut self,
photo_height: Option<i64>,
) -> &'a mut Self
pub fn set_photo_height<'a>( &'a mut self, photo_height: Option<i64>, ) -> &'a mut Self
Optional. Height of the photo
sourcepub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
pub fn set_title<'a>(&'a mut self, title: Option<String>) -> &'a mut Self
Optional. Title for the result
sourcepub fn get_description<'a>(&'a self) -> Option<&'a str>
pub fn get_description<'a>(&'a self) -> Option<&'a str>
Optional. Short description of the result
sourcepub fn set_description<'a>(
&'a mut self,
description: Option<String>,
) -> &'a mut Self
pub fn set_description<'a>( &'a mut self, description: Option<String>, ) -> &'a mut Self
Optional. Short description of the result
sourcepub fn get_caption<'a>(&'a self) -> Option<&'a str>
pub fn get_caption<'a>(&'a self) -> Option<&'a str>
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
sourcepub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
pub fn set_caption<'a>(&'a mut self, caption: Option<String>) -> &'a mut Self
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
sourcepub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
pub fn get_parse_mode<'a>(&'a self) -> Option<&'a str>
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
sourcepub fn set_parse_mode<'a>(
&'a mut self,
parse_mode: Option<String>,
) -> &'a mut Self
pub fn set_parse_mode<'a>( &'a mut self, parse_mode: Option<String>, ) -> &'a mut Self
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
sourcepub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
pub fn get_caption_entities<'a>(&'a self) -> Option<&'a Vec<MessageEntity>>
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_caption_entities<'a>(
&'a mut self,
caption_entities: Option<Vec<MessageEntity>>,
) -> &'a mut Self
pub fn set_caption_entities<'a>( &'a mut self, caption_entities: Option<Vec<MessageEntity>>, ) -> &'a mut Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>
pub fn get_show_caption_above_media<'a>(&'a self) -> Option<bool>
Optional. Pass True, if the caption must be shown above the message media
sourcepub fn set_show_caption_above_media<'a>(
&'a mut self,
show_caption_above_media: Option<bool>,
) -> &'a mut Self
pub fn set_show_caption_above_media<'a>( &'a mut self, show_caption_above_media: Option<bool>, ) -> &'a mut Self
Optional. Pass True, if the caption must be shown above the message media
sourcepub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
pub fn get_reply_markup<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>
Optional. Inline keyboard attached to the message
sourcepub fn set_reply_markup<'a>(
&'a mut self,
reply_markup: Option<InlineKeyboardMarkup>,
) -> &'a mut Self
pub fn set_reply_markup<'a>( &'a mut self, reply_markup: Option<InlineKeyboardMarkup>, ) -> &'a mut Self
Optional. Inline keyboard attached to the message
sourcepub fn get_input_message_content<'a>(
&'a self,
) -> Option<&'a InputMessageContent>
pub fn get_input_message_content<'a>( &'a self, ) -> Option<&'a InputMessageContent>
Optional. Content of the message to be sent instead of the photo
sourcepub fn set_input_message_content<'a>(
&'a mut self,
input_message_content: Option<InputMessageContent>,
) -> &'a mut Self
pub fn set_input_message_content<'a>( &'a mut self, input_message_content: Option<InputMessageContent>, ) -> &'a mut Self
Optional. Content of the message to be sent instead of the photo
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 moresource§impl Debug for InlineQueryResultPhoto
impl Debug for InlineQueryResultPhoto
source§impl Default for InlineQueryResultPhoto
impl Default for InlineQueryResultPhoto
source§fn default() -> InlineQueryResultPhoto
fn default() -> InlineQueryResultPhoto
source§impl<'de> Deserialize<'de> for InlineQueryResultPhoto
impl<'de> Deserialize<'de> for InlineQueryResultPhoto
source§fn 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>,
source§impl From<BoxWrapper<Box<InlineQueryResultPhoto>>> for InlineQueryResultPhoto
impl From<BoxWrapper<Box<InlineQueryResultPhoto>>> for InlineQueryResultPhoto
source§fn from(t: BoxWrapper<Box<InlineQueryResultPhoto>>) -> Self
fn from(t: BoxWrapper<Box<InlineQueryResultPhoto>>) -> Self
source§impl From<BoxWrapper<Unbox<InlineQueryResultPhoto>>> for InlineQueryResultPhoto
impl From<BoxWrapper<Unbox<InlineQueryResultPhoto>>> for InlineQueryResultPhoto
source§fn from(t: BoxWrapper<Unbox<InlineQueryResultPhoto>>) -> Self
fn from(t: BoxWrapper<Unbox<InlineQueryResultPhoto>>) -> Self
source§impl From<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto
impl From<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto
source§fn from(t: NoSkipInlineQueryResultPhoto) -> Self
fn from(t: NoSkipInlineQueryResultPhoto) -> Self
source§impl Hash for InlineQueryResultPhoto
impl Hash for InlineQueryResultPhoto
source§impl Into<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto
impl Into<NoSkipInlineQueryResultPhoto> for InlineQueryResultPhoto
source§fn into(self) -> NoSkipInlineQueryResultPhoto
fn into(self) -> NoSkipInlineQueryResultPhoto
source§impl Ord for InlineQueryResultPhoto
impl Ord for InlineQueryResultPhoto
source§fn cmp(&self, other: &InlineQueryResultPhoto) -> Ordering
fn cmp(&self, other: &InlineQueryResultPhoto) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for InlineQueryResultPhoto
impl PartialEq for InlineQueryResultPhoto
source§fn eq(&self, other: &InlineQueryResultPhoto) -> bool
fn eq(&self, other: &InlineQueryResultPhoto) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InlineQueryResultPhoto
impl PartialOrd for InlineQueryResultPhoto
source§fn partial_cmp(&self, other: &InlineQueryResultPhoto) -> Option<Ordering>
fn partial_cmp(&self, other: &InlineQueryResultPhoto) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InlineQueryResultPhoto
impl Serialize for InlineQueryResultPhoto
impl Eq for InlineQueryResultPhoto
impl StructuralPartialEq for InlineQueryResultPhoto
Auto Trait Implementations§
impl Freeze for InlineQueryResultPhoto
impl RefUnwindSafe for InlineQueryResultPhoto
impl Send for InlineQueryResultPhoto
impl Sync for InlineQueryResultPhoto
impl Unpin for InlineQueryResultPhoto
impl UnwindSafe for InlineQueryResultPhoto
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.