pub struct InlineQueryResultLocation { /* private fields */ }
Expand description

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.

Implementations§

source§

impl InlineQueryResultLocation

source§

impl InlineQueryResultLocation

source

pub fn new(id: String, latitude: f64, longitude: f64, title: String) -> Self

source

pub fn get_tg_type<'a>(&'a self) -> Cow<'a, str>

Type of the result, must be location

source

pub fn get_tg_type_ref<'a>(&'a self) -> &'a str

Type of the result, must be location

source

pub fn get_id<'a>(&'a self) -> Cow<'a, str>

Unique identifier for this result, 1-64 Bytes

source

pub fn get_id_ref<'a>(&'a self) -> &'a str

Unique identifier for this result, 1-64 Bytes

source

pub fn get_latitude<'a>(&'a self) -> f64

Location latitude in degrees

source

pub fn get_latitude_ref<'a>(&'a self) -> f64

Location latitude in degrees

source

pub fn get_longitude<'a>(&'a self) -> f64

Location longitude in degrees

source

pub fn get_longitude_ref<'a>(&'a self) -> f64

Location longitude in degrees

source

pub fn get_title<'a>(&'a self) -> Cow<'a, str>

Location title

source

pub fn get_title_ref<'a>(&'a self) -> &'a str

Location title

source

pub fn get_horizontal_accuracy<'a>(&'a self) -> Option<f64>

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

source

pub fn get_horizontal_accuracy_ref<'a>(&'a self) -> Option<f64>

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

source

pub fn get_live_period<'a>(&'a self) -> Option<i64>

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

source

pub fn get_live_period_ref<'a>(&'a self) -> Option<i64>

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

source

pub fn get_heading<'a>(&'a self) -> Option<i64>

Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.

source

pub fn get_heading_ref<'a>(&'a self) -> Option<i64>

Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.

source

pub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>

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

source

pub fn get_proximity_alert_radius_ref<'a>(&'a self) -> Option<i64>

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

source

pub fn get_reply_markup<'a>(&'a self) -> Option<Cow<'a, InlineKeyboardMarkup>>

Optional. Inline keyboard attached to the message

source

pub fn get_reply_markup_ref<'a>(&'a self) -> Option<&'a InlineKeyboardMarkup>

Optional. Inline keyboard attached to the message

source

pub fn get_input_message_content<'a>( &'a self ) -> Option<Cow<'a, InputMessageContent>>

Optional. Content of the message to be sent instead of the location

source

pub fn get_input_message_content_ref<'a>( &'a self ) -> Option<&'a InputMessageContent>

Optional. Content of the message to be sent instead of the location

source

pub fn get_thumbnail_url<'a>(&'a self) -> Option<Cow<'a, str>>

Optional. Url of the thumbnail for the result

source

pub fn get_thumbnail_url_ref<'a>(&'a self) -> Option<&'a str>

Optional. Url of the thumbnail for the result

source

pub fn get_thumbnail_width<'a>(&'a self) -> Option<i64>

Optional. Thumbnail width

source

pub fn get_thumbnail_width_ref<'a>(&'a self) -> Option<i64>

Optional. Thumbnail width

source

pub fn get_thumbnail_height<'a>(&'a self) -> Option<i64>

Optional. Thumbnail height

source

pub fn get_thumbnail_height_ref<'a>(&'a self) -> Option<i64>

Optional. Thumbnail height

Trait Implementations§

source§

impl Clone for InlineQueryResultLocation

source§

fn clone(&self) -> InlineQueryResultLocation

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 InlineQueryResultLocation

source§

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

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

impl Default for InlineQueryResultLocation

source§

fn default() -> InlineQueryResultLocation

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for InlineQueryResultLocation

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 From<NoSkipInlineQueryResultLocation> for InlineQueryResultLocation

source§

fn from(t: NoSkipInlineQueryResultLocation) -> Self

Converts to this type from the input type.
source§

impl Into<NoSkipInlineQueryResultLocation> for InlineQueryResultLocation

source§

fn into(self) -> NoSkipInlineQueryResultLocation

Converts this type into the (usually inferred) input type.
source§

impl Serialize for InlineQueryResultLocation

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

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