pub struct GeolocationInfo {
pub is_available: bool,
pub latitude: f64,
pub longitude: f64,
pub altitude_m: Option<f64>,
pub accuracy_m: f64,
pub heading_deg: Option<f64>,
pub speed_mps: Option<f64>,
pub timestamp_ms: u64,
pub source: GeolocationSource,
}Expand description
Complete geolocation telemetry fix for reactive UI and map centering.
Fields§
§is_available: bool§latitude: f64§longitude: f64§altitude_m: Option<f64>§accuracy_m: f64§heading_deg: Option<f64>§speed_mps: Option<f64>§timestamp_ms: u64§source: GeolocationSourceImplementations§
Source§impl GeolocationInfo
impl GeolocationInfo
Sourcepub fn available(
latitude: f64,
longitude: f64,
accuracy_m: f64,
source: GeolocationSource,
) -> GeolocationInfo
pub fn available( latitude: f64, longitude: f64, accuracy_m: f64, source: GeolocationSource, ) -> GeolocationInfo
Constructs an available geolocation fix stamped with current wall-clock milliseconds.
pub fn with_altitude(self, altitude_m: Option<f64>) -> GeolocationInfo
pub fn with_motion( self, heading_deg: Option<f64>, speed_mps: Option<f64>, ) -> GeolocationInfo
Trait Implementations§
Source§impl Clone for GeolocationInfo
impl Clone for GeolocationInfo
Source§fn clone(&self) -> GeolocationInfo
fn clone(&self) -> GeolocationInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeolocationInfo
impl Debug for GeolocationInfo
Source§impl Default for GeolocationInfo
impl Default for GeolocationInfo
Source§fn default() -> GeolocationInfo
fn default() -> GeolocationInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for GeolocationInfo
impl PartialEq for GeolocationInfo
impl StructuralPartialEq for GeolocationInfo
Auto Trait Implementations§
impl Forget for GeolocationInfo
impl Freeze for GeolocationInfo
impl Move for GeolocationInfo
impl RefUnwindSafe for GeolocationInfo
impl Send for GeolocationInfo
impl Sync for GeolocationInfo
impl Unpin for GeolocationInfo
impl UnsafeUnpin for GeolocationInfo
impl UnwindSafe for GeolocationInfo
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
Mutably borrows from an owned value. Read more