pub struct InlineQueryResultLocation {Show 13 fields
pub id: String,
pub latitude: f64,
pub longitude: f64,
pub title: String,
pub horizontal_accuracy: Option<f64>,
pub live_period: Option<i32>,
pub heading: Option<u16>,
pub proximity_alert_radius: Option<u32>,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub input_message_content: Option<InputMessageContent>,
pub thumb_url: Option<Url>,
pub thumb_width: Option<u32>,
pub thumb_height: Option<u32>,
}
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.
Fields§
§id: String
Unique identifier for this result, 1-64 Bytes.
latitude: f64
Location latitude in degrees.
longitude: f64
Location longitude in degrees.
title: String
Location title.
horizontal_accuracy: Option<f64>
The radius of uncertainty for the location, measured in meters; 0-1500
live_period: Option<i32>
Period in seconds for which the location can be updated, should be between 60 and 86400.
heading: Option<u16>
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.
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 location.
thumb_url: Option<Url>
Url of the thumbnail for the result.
thumb_width: Option<u32>
Thumbnail width.
thumb_height: Option<u32>
Thumbnail height.
Implementations§
Source§impl InlineQueryResultLocation
impl InlineQueryResultLocation
pub fn new<S1, S2>(id: S1, title: S2, latitude: f64, longitude: f64) -> Self
pub fn id<S>(self, val: S) -> Self
pub fn latitude(self, val: f64) -> Self
pub fn longitude(self, val: f64) -> Self
pub fn title<S>(self, val: S) -> Self
pub fn horizontal_accuracy<S>(self, val: f64) -> Self
pub fn live_period(self, val: i32) -> Self
pub fn heading(self, val: u16) -> Self
pub fn proximity_alert_radius(self, val: u32) -> Self
pub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
pub fn input_message_content(self, val: InputMessageContent) -> Self
pub fn thumb_url(self, val: Url) -> Self
pub fn thumb_width(self, val: u32) -> Self
pub fn thumb_height(self, val: u32) -> Self
Trait Implementations§
Source§impl Clone for InlineQueryResultLocation
impl Clone for InlineQueryResultLocation
Source§fn clone(&self) -> InlineQueryResultLocation
fn clone(&self) -> InlineQueryResultLocation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InlineQueryResultLocation
impl Debug for InlineQueryResultLocation
Source§impl<'de> Deserialize<'de> for InlineQueryResultLocation
impl<'de> Deserialize<'de> for InlineQueryResultLocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<InlineQueryResultLocation> for InlineQueryResult
impl From<InlineQueryResultLocation> for InlineQueryResult
Source§fn from(original: InlineQueryResultLocation) -> InlineQueryResult
fn from(original: InlineQueryResultLocation) -> InlineQueryResult
impl StructuralPartialEq for InlineQueryResultLocation
Auto Trait Implementations§
impl Freeze for InlineQueryResultLocation
impl RefUnwindSafe for InlineQueryResultLocation
impl Send for InlineQueryResultLocation
impl Sync for InlineQueryResultLocation
impl Unpin for InlineQueryResultLocation
impl UnwindSafe for InlineQueryResultLocation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more