pub struct LocationData {
pub latitude: f64,
pub longitude: f64,
pub accuracy: f64,
pub altitude: Option<f64>,
pub altitude_accuracy: Option<f64>,
pub heading: Option<f64>,
pub speed: Option<f64>,
pub timestamp_ms: f64,
}Expand description
Geographic coordinates returned by the browser Geolocation API.
Fields that are optional in the spec are None when the browser or device
did not supply them.
Fields§
§latitude: f64Latitude in decimal degrees (WGS 84).
longitude: f64Longitude in decimal degrees (WGS 84).
accuracy: f64Horizontal accuracy radius in metres (95 % confidence).
altitude: Option<f64>Altitude in metres above the WGS 84 ellipsoid, if provided by the device.
altitude_accuracy: Option<f64>Accuracy of altitude in metres, if provided.
heading: Option<f64>Direction of travel clockwise from true north in degrees [0, 360),
or None when the device is stationary or the sensor is unavailable.
speed: Option<f64>Ground speed in metres per second, or None when unavailable.
timestamp_ms: f64Browser timestamp in milliseconds since the Unix epoch at which the position was acquired.
Trait Implementations§
Source§impl Clone for LocationData
impl Clone for LocationData
Source§fn clone(&self) -> LocationData
fn clone(&self) -> LocationData
Returns a duplicate of the value. Read more
1.0.0 · 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 LocationData
impl Debug for LocationData
Source§impl PartialEq for LocationData
impl PartialEq for LocationData
impl StructuralPartialEq for LocationData
Auto Trait Implementations§
impl Freeze for LocationData
impl RefUnwindSafe for LocationData
impl Send for LocationData
impl Sync for LocationData
impl Unpin for LocationData
impl UnsafeUnpin for LocationData
impl UnwindSafe for LocationData
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