pub enum InputMessageContent {
    Text {
        message_text: String,
        parse_mode: Option<String>,
        entities: Vec<MessageEntity>,
        disable_web_page_preview: Option<bool>,
    },
    Location {
        latitude: f32,
        longitude: f32,
        horizontal_accuracy: Option<f32>,
        live_period: Option<i64>,
        heading: Option<i64>,
        proximity_alert_radius: Option<i64>,
    },
    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>,
    },
    Contact {
        phone_number: String,
        first_name: String,
        last_name: Option<String>,
        vcard: Option<String>,
    },
    Invoice {
Show 20 fields title: String, description: String, payload: String, provider_token: String, currency: String, prices: Vec<LabeledPrice>, max_tip_amount: Option<i64>, suggested_tip_amounts: Vec<i64>, provider_data: Option<String>, photo_url: Option<String>, photo_size: Option<i64>, photo_width: Option<i64>, photo_height: Option<i64>, need_name: Option<bool>, need_phone_number: Option<bool>, need_email: Option<bool>, need_shipping_address: Option<bool>, send_phone_number_to_provider: Option<bool>, send_email_to_provider: Option<bool>, is_flexible: Option<bool>,
}, }
Expand description

This object represents the content of a message to be sent as a result of an inline query

Variants§

§

Text

Fields

§message_text: String

Text of the message to be sent, 1-4096 characters

§parse_mode: Option<String>

Mode for parsing entities in the message text. See formatting options for more details.

§entities: Vec<MessageEntity>

List of special entities that appear in message text, which can be specified instead of parse_mode

§disable_web_page_preview: Option<bool>

Disables link previews for links in the sent message

Represents the content of a text message to be sent as the result of an inline query.

§

Location

Fields

§latitude: f32

Latitude of the location in degrees

§longitude: f32

Longitude of the location in degrees

§horizontal_accuracy: Option<f32>

The radius of uncertainty for the location, measured in meters; 0-1500

§live_period: Option<i64>

Period in seconds for which the location can be updated, should be between 60 and 86400.

§heading: Option<i64>

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<i64>

For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.

Represents the content of a location message to be sent as the result of an inline query.

§

Venue

Fields

§latitude: f32

Latitude of the venue in degrees

§longitude: f32

Longitude of the venue in degrees

§title: String

Name of the venue

§address: String

Address of the venue

§foursquare_id: Option<String>

Foursquare identifier of the venue, if known

§foursquare_type: Option<String>

Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)

§google_place_id: Option<String>

Google Places identifier of the venue

§google_place_type: Option<String>

Google Places type of the venue. (See supported types.)

Represents the content of a venue message to be sent as the result of an inline query.

§

Contact

Fields

§phone_number: String

Contact’s phone number

§first_name: String

Contact’s first name

§last_name: Option<String>

Contact’s last name

§vcard: Option<String>

Additional data about the contact in the form of a vCard, 0-2048 bytes

Represents the content of a contact message to be sent as the result of an inline query.

§

Invoice

Fields

§title: String

Product name, 1-32 characters

§description: String

Product description, 1-255 characters

§payload: String

Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.

§provider_token: String

Payment provider token, obtained via @BotFather

§currency: String

Three-letter ISO 4217 currency code, see more on currencies

§prices: Vec<LabeledPrice>

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

§max_tip_amount: Option<i64>

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

§suggested_tip_amounts: Vec<i64>

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.

§provider_data: Option<String>

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.

§photo_url: Option<String>

URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.

§photo_size: Option<i64>

Photo size in bytes

§photo_width: Option<i64>

Photo width

§photo_height: Option<i64>

Photo height

§need_name: Option<bool>

Pass True if you require the user’s full name to complete the order

§need_phone_number: Option<bool>

Pass True if you require the user’s phone number to complete the order

§need_email: Option<bool>

Pass True if you require the user’s email address to complete the order

§need_shipping_address: Option<bool>

Pass True if you require the user’s shipping address to complete the order

§send_phone_number_to_provider: Option<bool>

Pass True if the user’s phone number should be sent to provider

§send_email_to_provider: Option<bool>

Pass True if the user’s email address should be sent to provider

§is_flexible: Option<bool>

Pass True if the final price depends on the shipping method

Represents the content of an invoice message to be sent as the result of an inline query.

Trait Implementations§

source§

impl Clone for InputMessageContent

source§

fn clone(&self) -> InputMessageContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InputMessageContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for InputMessageContent

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for InputMessageContent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,