pub struct GeolocationPositionData {
pub accuracy: f64,
pub latitude: f64,
pub longitude: f64,
pub altitude: Option<f64>,
pub altitude_accuracy: Option<f64>,
pub heading: Option<f64>,
pub speed: Option<f64>,
}Expand description
A position acquired from the underlying system.
This mirrors the spec’s “positionData” map, which is used to construct a GeolocationCoordinates.
Fields§
§accuracy: f64The accuracy, in meters, at the 95% confidence level. Must not be negative.
latitude: f64Degrees north of the Equator.
longitude: f64Degrees east of the Prime Meridian.
altitude: Option<f64>Meters above the WGS84 ellipsoid, or None if not available.
altitude_accuracy: Option<f64>Accuracy of Self::altitude in meters at the 95% confidence level, or None if not
available. Must not be negative.
heading: Option<f64>Direction of travel in degrees clockwise from true north, or None if not available.
Servo reports None to script whenever Self::speed is zero, so an embedder does not
need to special-case a stationary device.
speed: Option<f64>Ground speed in meters per second, or None if not available. Must not be negative.
Implementations§
Trait Implementations§
Source§impl Clone for GeolocationPositionData
impl Clone for GeolocationPositionData
Source§fn clone(&self) -> GeolocationPositionData
fn clone(&self) -> GeolocationPositionData
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<'de> Deserialize<'de> for GeolocationPositionData
impl<'de> Deserialize<'de> for GeolocationPositionData
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MallocSizeOf for GeolocationPositionData
impl MallocSizeOf for GeolocationPositionData
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for GeolocationPositionData
impl PartialEq for GeolocationPositionData
Source§fn eq(&self, other: &GeolocationPositionData) -> bool
fn eq(&self, other: &GeolocationPositionData) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GeolocationPositionData
impl Serialize for GeolocationPositionData
impl StructuralPartialEq for GeolocationPositionData
Auto Trait Implementations§
impl Freeze for GeolocationPositionData
impl RefUnwindSafe for GeolocationPositionData
impl Send for GeolocationPositionData
impl Sync for GeolocationPositionData
impl Unpin for GeolocationPositionData
impl UnsafeUnpin for GeolocationPositionData
impl UnwindSafe for GeolocationPositionData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert