pub enum InlineQueryResultKind {
Show 19 variants
Article {
title: String,
input_message_content: InputMessageContent,
url: Option<String>,
hide_url: Option<bool>,
description: Option<String>,
thumb_url: Option<String>,
thumb_width: Option<u32>,
thumb_height: Option<u32>,
},
Photo {
photo_url: String,
thumb_url: String,
photo_width: Option<u32>,
photo_height: Option<u32>,
title: Option<String>,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Gif {
gif_url: String,
gif_width: Option<u32>,
gif_height: Option<u32>,
gif_duration: Option<u32>,
thumb_url: String,
thumb_mime_type: Option<String>,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Mpeg4Gif {
mpeg4_url: String,
mpeg4_width: Option<u32>,
mpeg4_height: Option<u32>,
mpeg4_duration: Option<u32>,
thumb_url: String,
thumb_mime_type: Option<String>,
title: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Video {
video_url: String,
mime_type: String,
thumb_url: String,
title: String,
video_width: Option<u32>,
video_height: Option<u32>,
video_duration: Option<u32>,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Audio {
audio_url: String,
title: String,
performer: Option<String>,
audio_duration: Option<u32>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Voice {
voice_url: String,
title: String,
voice_duration: Option<u32>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Document {
document_url: String,
mime_type: String,
description: String,
thumb_url: Option<String>,
thumb_width: Option<u32>,
thumb_height: Option<u32>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
Location {
latitude: f32,
longitude: f32,
title: String,
horizontal_accuracy: f32,
live_period: Option<u32>,
heading: Option<u32>,
proximity_alert_radius: Option<u32>,
thumb_url: Option<String>,
thumb_width: Option<u32>,
thumb_height: Option<u32>,
input_message_content: Option<InputMessageContent>,
},
Venue {
latitude: f32,
longitude: f32,
title: String,
address: String,
foursquare_id: Option<String>,
foursquare_type: Option<String>,
google_place_id: Option<String>,
google_place_type: Option<String>,
thumb_url: Option<String>,
thumb_width: Option<u32>,
thumb_height: Option<u32>,
input_message_content: Option<InputMessageContent>,
},
Contact {
phone_number: String,
first_name: String,
last_name: Option<String>,
vcard: Option<String>,
thumb_url: Option<String>,
thumb_width: Option<u32>,
thumb_height: Option<u32>,
input_message_content: Option<InputMessageContent>,
},
Game {
game_short_name: String,
},
CachedPhoto {
photo_file_id: String,
title: String,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedGif {
gif_file_id: String,
title: String,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedMpeg4Gif {
mpeg4_file_id: String,
title: String,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedVideo {
video_file_id: String,
title: String,
description: Option<String>,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedAudio {
audio_file_id: String,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedVoice {
voice_file_id: String,
title: String,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
CachedDocument {
document_file_id: String,
title: String,
description: String,
caption: Option<String>,
parse_mode: Option<ParseMode>,
caption_entities: Option<Vec<MessageEntity>>,
input_message_content: Option<InputMessageContent>,
},
}Expand description
Inline query result type
Variants§
Article
Represents a link to an article or web page.
Fields
input_message_content: InputMessageContentContent of the message to be sent
Photo
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
photo_url: StringA valid URL of the photo. Photo must be in jpeg format.
Photo size must not exceed 5MB
parse_mode: Option<ParseMode>Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the photo
Gif
Represents a link to an animated GIF file.
By default, this animated GIF file 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 animation.
Fields
thumb_mime_type: Option<String>MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
caption: Option<String>Caption of the GIF file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the GIF animation
Mpeg4Gif
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
By default, this animated MPEG-4 file 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 animation.
Fields
thumb_mime_type: Option<String>MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”
caption: Option<String>Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video animation
Video
Represents a link to a page containing an embedded video player or a video file.
By default, this video file 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 video.
If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
Audio
Represents a link to an MP3 audio file.
By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the audio
Voice
Represents a link to a voice recording in an .OGG container encoded with OPUS.
By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the voice recording
Document
Represents a link to a file.
By default, this file 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 file. Currently, only .PDF and .ZIP files can be sent using this method.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
mime_type: StringMime type of the content of the file, either “application/pdf” or “application/zip”
caption: Option<String>Caption of the document to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the file
Location
Represents a location on a map.
By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
live_period: Option<u32>Period in seconds for which the location can be updated, should be between 60 and 86400.
heading: Option<u32>For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
proximity_alert_radius: Option<u32>For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the location
Venue
Represents a venue.
By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
foursquare_type: Option<String>Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
google_place_type: Option<String>Google Places type of the venue. (See supported types.)
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the venue
Contact
Represents a contact with a phone number.
By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the contact
Game
Represents a Game.
CachedPhoto
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.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the photo
CachedGif
Represents a link to an animated GIF file stored on the Telegram servers.
By default, this animated GIF file 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 animation.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
caption: Option<String>Caption of the GIF file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the GIF animation
CachedMpeg4Gif
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.
By default, this animated MPEG-4 file 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 animation.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
caption: Option<String>Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video animation
CachedVideo
Represents a link to a video file stored on the Telegram servers.
By default, this video file 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 video.
If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
CachedAudio
Represents a link to an MP3 audio file stored on the Telegram servers.
By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the audio
CachedVoice
Represents a link to a voice message stored on the Telegram servers.
By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the voice recording
CachedDocument
Represents a link to a file stored on the Telegram servers.
By default, this file 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 file. Currently, only .PDF and .ZIP files can be sent using this method.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Fields
caption: Option<String>Caption of the document to be sent, 0-1024 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the caption. See formatting options for more details.
caption_entities: Option<Vec<MessageEntity>>List of special entities that appear in the caption, which can be specified instead of parse_mode
input_message_content: Option<InputMessageContent>Content of the message to be sent instead of the file
Implementations§
Source§impl InlineQueryResultKind
impl InlineQueryResultKind
pub fn with_id(self, id: impl Into<String>) -> InlineQueryResult
Trait Implementations§
Source§impl Clone for InlineQueryResultKind
impl Clone for InlineQueryResultKind
Source§fn clone(&self) -> InlineQueryResultKind
fn clone(&self) -> InlineQueryResultKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more