#[non_exhaustive]pub struct Live {
pub live_period: u32,
pub heading: Option<u16>,
pub proximity_alert_radius: Option<u32>,
}
Expand description
Information about a live location.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.live_period: u32
Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.
heading: Option<u16>
The direction in which user is moving, in degrees and in range
1..=360
. For active live locations only.
proximity_alert_radius: Option<u32>
Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
Implementations§
source§impl Live
impl Live
sourcepub fn new(live_period: u32) -> Self
pub fn new(live_period: u32) -> Self
Creates a new live location. The live_period
must be in range
60..=86_400
; it reflects the live_period
parameter.
Panics
Panics if the duration is not in range 60..=86_400
.
sourcepub fn heading(self, heading: u16) -> Self
pub fn heading(self, heading: u16) -> Self
Configures the direction in which the user is headed. The value must be
in range 1..=360
. Reflects the heading
parameter.
Panics
Panics if heading
is not in range 1..=360
.
sourcepub fn proximity_alert_radius(self, radius: u32) -> Self
pub fn proximity_alert_radius(self, radius: u32) -> Self
Configures the maximum distance for proximity alerts about a user
approaching another, in meters. The value must be in range
1..=100_000
. Reflects the proximity_alert_radius
paramter.
Panics
Panics if the value is not in range 1..=100_000
.