EditMessageLiveLocation

Struct EditMessageLiveLocation 

Source
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: ChatId

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

§message_id: i64

Identifier of the message to edit

§latitude: f32

Latitude of new location

§longitude: f32

Longitude 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

Source

pub fn new( chat_id: impl Into<ChatId>, message_id: i64, latitude: f32, longitude: f32, ) -> Self

Create a new editMessageLiveLocation request

Source

pub fn with_horizontal_accuracy(self, accuracy: f32) -> Self

Set horizontal accuracy

Source

pub fn with_heading(self, direction: u32) -> Self

Set heading

Source

pub fn proximity_alert_within(self, radius: u32) -> Self

Set proximity alert radius

Source

pub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self

Set reply markup

Trait Implementations§

Source§

impl Clone for EditMessageLiveLocation

Source§

fn clone(&self) -> EditMessageLiveLocation

Returns a duplicate 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 Serialize for EditMessageLiveLocation

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

impl TelegramMethod for EditMessageLiveLocation

Source§

type Response = Message

Source§

fn name() -> &'static str

Source§

impl JsonMethod for EditMessageLiveLocation

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.