pub struct InlineQueryResultPhoto {
pub id: String,
pub photo_url: Url,
pub thumb_url: Url,
pub photo_width: Option<i32>,
pub photo_height: Option<i32>,
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: Url
A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB.
thumb_url: Url
URL of the thumbnail for the photo.
photo_width: Option<i32>
Width of the photo.
photo_height: Option<i32>
Height of the photo.
title: Option<String>
Title for the result.
description: Option<String>
Short description of the result.
caption: Option<String>
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.
caption_entities: Option<Vec<MessageEntity>>
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 new<S>(id: S, photo_url: Url, thumb_url: Url) -> Self
pub fn id<S>(self, val: S) -> Self
pub fn photo_url(self, val: Url) -> Self
pub fn thumb_url<S>(self, val: Url) -> Self
pub fn photo_width(self, val: i32) -> Self
pub fn photo_height(self, val: i32) -> Self
pub fn title<S>(self, val: S) -> Self
pub fn description<S>(self, val: S) -> Self
pub fn caption<S>(self, val: S) -> Self
pub fn parse_mode(self, val: ParseMode) -> Self
pub fn caption_entities<C>(self, val: C) -> Selfwhere
C: IntoIterator<Item = MessageEntity>,
pub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
pub fn input_message_content(self, val: 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 moreSource§impl Debug for InlineQueryResultPhoto
impl Debug for 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<InlineQueryResultPhoto> for InlineQueryResult
impl From<InlineQueryResultPhoto> for InlineQueryResult
Source§fn from(original: InlineQueryResultPhoto) -> InlineQueryResult
fn from(original: InlineQueryResultPhoto) -> InlineQueryResult
Source§impl PartialEq for InlineQueryResultPhoto
impl PartialEq for InlineQueryResultPhoto
Source§impl Serialize for InlineQueryResultPhoto
impl Serialize 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§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more