pub struct EditMessageLiveLocation {
pub chat_id: ChatId,
pub message_id: i64,
pub latitude: f32,
pub longitude: f32,
pub horizontal_accuracy: Option<f32>,
pub heading: Option<u32>,
pub proximity_alert_radius: Option<u32>,
pub reply_markup: Option<InlineKeyboardMarkup>,
}Expand description
Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, the edited Message is returned.
Fields§
§chat_id: ChatIdUnique identifier for the target chat or username of the target channel (in the format @channelusername)
message_id: i64Identifier of the message to edit
latitude: f32Latitude of new location
longitude: f32Longitude of new location
horizontal_accuracy: Option<f32>The radius of uncertainty for the location, measured in meters; 0-1500
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.
reply_markup: Option<InlineKeyboardMarkup>A JSON-serialized object for a new inline keyboard.
Implementations§
Source§impl EditMessageLiveLocation
impl EditMessageLiveLocation
Sourcepub fn new(
chat_id: impl Into<ChatId>,
message_id: i64,
latitude: f32,
longitude: f32,
) -> Self
pub fn new( chat_id: impl Into<ChatId>, message_id: i64, latitude: f32, longitude: f32, ) -> Self
Create a new editMessageLiveLocation request
Sourcepub fn with_horizontal_accuracy(self, accuracy: f32) -> Self
pub fn with_horizontal_accuracy(self, accuracy: f32) -> Self
Set horizontal accuracy
Sourcepub fn with_heading(self, direction: u32) -> Self
pub fn with_heading(self, direction: u32) -> Self
Set heading
Sourcepub fn proximity_alert_within(self, radius: u32) -> Self
pub fn proximity_alert_within(self, radius: u32) -> Self
Set proximity alert radius
Sourcepub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self
pub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self
Set reply markup
Trait Implementations§
Source§impl Clone for EditMessageLiveLocation
impl Clone for EditMessageLiveLocation
Source§fn clone(&self) -> EditMessageLiveLocation
fn clone(&self) -> EditMessageLiveLocation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more