pub enum InputMessageContent {
InputInvoiceMessageContent(InputInvoiceMessageContent),
InputVenueMessageContent(InputVenueMessageContent),
InputLocationMessageContent(InputLocationMessageContent),
InputContactMessageContent(InputContactMessageContent),
InputTextMessageContent(InputTextMessageContent),
InputRichMessageContent(InputRichMessageContent),
}Expand description
This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following types:
crate::types::InputTextMessageContentcrate::types::InputRichMessageContentcrate::types::InputLocationMessageContentcrate::types::InputVenueMessageContentcrate::types::InputContactMessageContentcrate::types::InputInvoiceMessageContent
§Documentation
Variants§
InputInvoiceMessageContent(InputInvoiceMessageContent)
InputVenueMessageContent(InputVenueMessageContent)
InputLocationMessageContent(InputLocationMessageContent)
InputContactMessageContent(InputContactMessageContent)
InputTextMessageContent(InputTextMessageContent)
InputRichMessageContent(InputRichMessageContent)
Implementations§
Source§impl InputMessageContent
impl InputMessageContent
Sourcepub fn currency(&self) -> Option<&str>
pub fn currency(&self) -> Option<&str>
Helper method for field currency.
Three-letter ISO 4217 currency code, see more on currencies. Pass XTR for payments in Telegram Stars.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Helper method for field description.
Product description, 1-255 characters
Sourcepub fn entities(&self) -> Option<&[MessageEntity]>
pub fn entities(&self) -> Option<&[MessageEntity]>
Helper method for field entities.
List of special entities that appear in message text, which can be specified instead of parse_mode
Sourcepub fn first_name(&self) -> Option<&str>
pub fn first_name(&self) -> Option<&str>
Helper method for field first_name.
Contact’s first name
Sourcepub fn foursquare_id(&self) -> Option<&str>
pub fn foursquare_id(&self) -> Option<&str>
Helper method for field foursquare_id.
Foursquare identifier of the venue, if known
Sourcepub fn foursquare_type(&self) -> Option<&str>
pub fn foursquare_type(&self) -> Option<&str>
Helper method for field foursquare_type.
Foursquare type of the venue, if known. (For example, arts_entertainment/default, arts_entertainment/aquarium or food/icecream.)
Sourcepub fn google_place_id(&self) -> Option<&str>
pub fn google_place_id(&self) -> Option<&str>
Helper method for field google_place_id.
Google Places identifier of the venue
Sourcepub fn google_place_type(&self) -> Option<&str>
pub fn google_place_type(&self) -> Option<&str>
Helper method for field google_place_type.
Google Places type of the venue. (See supported types.)
Sourcepub fn heading(&self) -> Option<u16>
pub fn heading(&self) -> Option<u16>
Helper method for field heading.
For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
Sourcepub fn horizontal_accuracy(&self) -> Option<f64>
pub fn horizontal_accuracy(&self) -> Option<f64>
Helper method for field horizontal_accuracy.
The radius of uncertainty for the location, measured in meters; 0-1500
Sourcepub fn is_flexible(&self) -> Option<bool>
pub fn is_flexible(&self) -> Option<bool>
Helper method for field is_flexible.
Pass true if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
Sourcepub fn latitude(&self) -> Option<f64>
pub fn latitude(&self) -> Option<f64>
Helper method for field latitude.
§Variants
InputVenueMessageContent. Latitude of the venue in degreesInputLocationMessageContent. Latitude of the location in degrees
Sourcepub fn link_preview_options(&self) -> Option<&LinkPreviewOptions>
pub fn link_preview_options(&self) -> Option<&LinkPreviewOptions>
Helper method for field link_preview_options.
Link preview generation options for the message
Sourcepub fn live_period(&self) -> Option<u32>
pub fn live_period(&self) -> Option<u32>
Helper method for field live_period.
Period in seconds during which the location can be updated, must be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely
Sourcepub fn longitude(&self) -> Option<f64>
pub fn longitude(&self) -> Option<f64>
Helper method for field longitude.
§Variants
InputVenueMessageContent. Longitude of the venue in degreesInputLocationMessageContent. Longitude of the location in degrees
Sourcepub fn max_tip_amount(&self) -> Option<i64>
pub fn max_tip_amount(&self) -> Option<i64>
Helper method for field max_tip_amount.
The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
Sourcepub fn message_text(&self) -> Option<&str>
pub fn message_text(&self) -> Option<&str>
Helper method for field message_text.
Text of the message to be sent, 1-4096 characters
Sourcepub fn need_email(&self) -> Option<bool>
pub fn need_email(&self) -> Option<bool>
Helper method for field need_email.
Pass true if you require the user’s email address to complete the order. Ignored for payments in Telegram Stars.
Sourcepub fn need_name(&self) -> Option<bool>
pub fn need_name(&self) -> Option<bool>
Helper method for field need_name.
Pass true if you require the user’s full name to complete the order. Ignored for payments in Telegram Stars.
Sourcepub fn need_phone_number(&self) -> Option<bool>
pub fn need_phone_number(&self) -> Option<bool>
Helper method for field need_phone_number.
Pass true if you require the user’s phone number to complete the order. Ignored for payments in Telegram Stars.
Sourcepub fn need_shipping_address(&self) -> Option<bool>
pub fn need_shipping_address(&self) -> Option<bool>
Helper method for field need_shipping_address.
Pass true if you require the user’s shipping address to complete the order. Ignored for payments in Telegram Stars.
Sourcepub fn parse_mode(&self) -> Option<&str>
pub fn parse_mode(&self) -> Option<&str>
Helper method for field parse_mode.
Mode for parsing entities in the message text. See formatting options for more details.
Sourcepub fn payload(&self) -> Option<&str>
pub fn payload(&self) -> Option<&str>
Helper method for field payload.
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
Sourcepub fn phone_number(&self) -> Option<&str>
pub fn phone_number(&self) -> Option<&str>
Helper method for field phone_number.
Contact’s phone number
Sourcepub fn photo_height(&self) -> Option<i64>
pub fn photo_height(&self) -> Option<i64>
Helper method for field photo_height.
Photo height
Sourcepub fn photo_size(&self) -> Option<i64>
pub fn photo_size(&self) -> Option<i64>
Helper method for field photo_size.
Photo size in bytes
Sourcepub fn photo_url(&self) -> Option<&str>
pub fn photo_url(&self) -> Option<&str>
Helper method for field photo_url.
URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
Sourcepub fn photo_width(&self) -> Option<i64>
pub fn photo_width(&self) -> Option<i64>
Helper method for field photo_width.
Photo width
Sourcepub fn prices(&self) -> Option<&[LabeledPrice]>
pub fn prices(&self) -> Option<&[LabeledPrice]>
Helper method for field prices.
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
Sourcepub fn provider_data(&self) -> Option<&str>
pub fn provider_data(&self) -> Option<&str>
Helper method for field provider_data.
A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.
Sourcepub fn provider_token(&self) -> Option<&str>
pub fn provider_token(&self) -> Option<&str>
Helper method for field provider_token.
Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
Sourcepub fn proximity_alert_radius(&self) -> Option<u32>
pub fn proximity_alert_radius(&self) -> Option<u32>
Helper method for field proximity_alert_radius.
For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
Sourcepub fn rich_message(&self) -> Option<&InputRichMessage>
pub fn rich_message(&self) -> Option<&InputRichMessage>
Helper method for field rich_message.
The message to be sent. Only previously uploaded files may be used in the message.
Sourcepub fn send_email_to_provider(&self) -> Option<bool>
pub fn send_email_to_provider(&self) -> Option<bool>
Helper method for field send_email_to_provider.
Pass true if the user’s email address should be sent to the provider. Ignored for payments in Telegram Stars.
Sourcepub fn send_phone_number_to_provider(&self) -> Option<bool>
pub fn send_phone_number_to_provider(&self) -> Option<bool>
Helper method for field send_phone_number_to_provider.
Pass true if the user’s phone number should be sent to the provider. Ignored for payments in Telegram Stars.
Sourcepub fn suggested_tip_amounts(&self) -> Option<&[i64]>
pub fn suggested_tip_amounts(&self) -> Option<&[i64]>
Helper method for field suggested_tip_amounts.
A JSON-serialized Array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
Sourcepub fn title(&self) -> Option<&str>
pub fn title(&self) -> Option<&str>
Helper method for field title.
§Variants
InputInvoiceMessageContent. Product name, 1-32 charactersInputVenueMessageContent. Name of the venue
Sourcepub fn vcard(&self) -> Option<&str>
pub fn vcard(&self) -> Option<&str>
Helper method for field vcard.
Additional data about the contact in the form of a vCard, 0-2048 bytes
Sourcepub fn blocks(&self) -> Option<&[InputRichBlock]>
pub fn blocks(&self) -> Option<&[InputRichBlock]>
Helper method for nested field blocks.
Sourcepub fn is_disabled(&self) -> Option<bool>
pub fn is_disabled(&self) -> Option<bool>
Helper method for nested field is_disabled.
Sourcepub fn media(&self) -> Option<&[InputRichMessageMedia]>
pub fn media(&self) -> Option<&[InputRichMessageMedia]>
Helper method for nested field media.
Sourcepub fn prefer_large_media(&self) -> Option<bool>
pub fn prefer_large_media(&self) -> Option<bool>
Helper method for nested field prefer_large_media.
Sourcepub fn prefer_small_media(&self) -> Option<bool>
pub fn prefer_small_media(&self) -> Option<bool>
Helper method for nested field prefer_small_media.
Sourcepub fn show_above_text(&self) -> Option<bool>
pub fn show_above_text(&self) -> Option<bool>
Helper method for nested field show_above_text.
Sourcepub fn skip_entity_detection(&self) -> Option<bool>
pub fn skip_entity_detection(&self) -> Option<bool>
Helper method for nested field skip_entity_detection.
Trait Implementations§
Source§impl Clone for InputMessageContent
impl Clone for InputMessageContent
Source§fn clone(&self) -> InputMessageContent
fn clone(&self) -> InputMessageContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more