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,
) -> Self
pub fn available( latitude: f64, longitude: f64, accuracy_m: f64, source: GeolocationSource, ) -> Self
Constructs an available geolocation fix stamped with current wall-clock milliseconds.
pub fn with_altitude(self, altitude_m: Option<f64>) -> Self
pub fn with_motion( self, heading_deg: Option<f64>, speed_mps: Option<f64>, ) -> Self
Trait Implementations§
Source§impl Clone for GeolocationInfo
impl Clone for GeolocationInfo
Source§impl Debug for GeolocationInfo
impl Debug for GeolocationInfo
Source§impl Default for GeolocationInfo
impl Default for GeolocationInfo
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