[][src]Struct teloxide::types::InlineQueryResultCachedPhoto

#[non_exhaustive]pub struct InlineQueryResultCachedPhoto {
    pub id: String,
    pub photo_file_id: String,
    pub title: Option<String>,
    pub description: Option<String>,
    pub caption: Option<String>,
    pub parse_mode: Option<ParseMode>,
    pub reply_markup: Option<InlineKeyboardMarkup>,
    pub input_message_content: Option<InputMessageContent>,
}

Represents a link to a photo stored on the Telegram servers.

By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

The official docs.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
id: String

Unique identifier for this result, 1-64 bytes.

photo_file_id: String

A valid file identifier 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.

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

impl InlineQueryResultCachedPhoto[src]

pub fn new<S1, S2>(id: S1, photo_file_id: S2) -> Self where
    S1: Into<String>,
    S2: Into<String>, 
[src]

pub fn id<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn photo_file_id<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn title<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn description<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn caption<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn parse_mode<S>(self, val: ParseMode) -> Self[src]

pub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self[src]

pub fn input_message_content(self, val: InputMessageContent) -> Self[src]

Trait Implementations

impl Clone for InlineQueryResultCachedPhoto[src]

impl Debug for InlineQueryResultCachedPhoto[src]

impl<'de> Deserialize<'de> for InlineQueryResultCachedPhoto[src]

impl From<InlineQueryResultCachedPhoto> for InlineQueryResult[src]

impl PartialEq<InlineQueryResultCachedPhoto> for InlineQueryResultCachedPhoto[src]

impl Serialize for InlineQueryResultCachedPhoto[src]

impl StructuralPartialEq for InlineQueryResultCachedPhoto[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.