pub struct Location {
pub latitude: OrderedFloat<f64>,
pub longitude: OrderedFloat<f64>,
pub horizontal_accuracy: Option<OrderedFloat<f64>>,
pub live_period: Option<i64>,
pub heading: Option<i64>,
pub proximity_alert_radius: Option<i64>,
}
Expand description
This object represents a point on the map.
Fields§
§latitude: OrderedFloat<f64>
Latitude as defined by sender
longitude: OrderedFloat<f64>
Longitude as defined by sender
horizontal_accuracy: Option<OrderedFloat<f64>>
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
live_period: Option<i64>
Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
heading: Option<i64>
Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
proximity_alert_radius: Option<i64>
Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
Implementations§
source§impl Location
impl Location
pub fn new(latitude: OrderedFloat<f64>, longitude: OrderedFloat<f64>) -> Self
sourcepub fn get_latitude<'a>(&'a self) -> OrderedFloat<f64>
pub fn get_latitude<'a>(&'a self) -> OrderedFloat<f64>
Latitude as defined by sender
sourcepub fn set_latitude<'a>(
&'a mut self,
latitude: OrderedFloat<f64>,
) -> &'a mut Self
pub fn set_latitude<'a>( &'a mut self, latitude: OrderedFloat<f64>, ) -> &'a mut Self
Latitude as defined by sender
sourcepub fn get_longitude<'a>(&'a self) -> OrderedFloat<f64>
pub fn get_longitude<'a>(&'a self) -> OrderedFloat<f64>
Longitude as defined by sender
sourcepub fn set_longitude<'a>(
&'a mut self,
longitude: OrderedFloat<f64>,
) -> &'a mut Self
pub fn set_longitude<'a>( &'a mut self, longitude: OrderedFloat<f64>, ) -> &'a mut Self
Longitude as defined by sender
sourcepub fn get_horizontal_accuracy<'a>(&'a self) -> Option<OrderedFloat<f64>>
pub fn get_horizontal_accuracy<'a>(&'a self) -> Option<OrderedFloat<f64>>
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
sourcepub fn set_horizontal_accuracy<'a>(
&'a mut self,
horizontal_accuracy: Option<OrderedFloat<f64>>,
) -> &'a mut Self
pub fn set_horizontal_accuracy<'a>( &'a mut self, horizontal_accuracy: Option<OrderedFloat<f64>>, ) -> &'a mut Self
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
sourcepub fn get_live_period<'a>(&'a self) -> Option<i64>
pub fn get_live_period<'a>(&'a self) -> Option<i64>
Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
sourcepub fn set_live_period<'a>(
&'a mut self,
live_period: Option<i64>,
) -> &'a mut Self
pub fn set_live_period<'a>( &'a mut self, live_period: Option<i64>, ) -> &'a mut Self
Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
sourcepub fn get_heading<'a>(&'a self) -> Option<i64>
pub fn get_heading<'a>(&'a self) -> Option<i64>
Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
sourcepub fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self
pub fn set_heading<'a>(&'a mut self, heading: Option<i64>) -> &'a mut Self
Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
sourcepub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>
pub fn get_proximity_alert_radius<'a>(&'a self) -> Option<i64>
Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
sourcepub fn set_proximity_alert_radius<'a>(
&'a mut self,
proximity_alert_radius: Option<i64>,
) -> &'a mut Self
pub fn set_proximity_alert_radius<'a>( &'a mut self, proximity_alert_radius: Option<i64>, ) -> &'a mut Self
Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Location
impl<'de> Deserialize<'de> for Location
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<NoSkipLocation> for Location
impl From<NoSkipLocation> for Location
source§fn from(t: NoSkipLocation) -> Self
fn from(t: NoSkipLocation) -> Self
source§impl Into<NoSkipLocation> for Location
impl Into<NoSkipLocation> for Location
source§fn into(self) -> NoSkipLocation
fn into(self) -> NoSkipLocation
source§impl Ord for Location
impl Ord for Location
source§impl PartialEq for Location
impl PartialEq for Location
source§impl PartialOrd for Location
impl PartialOrd for Location
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.