pub struct Location<'a> { /* private fields */ }Expand description
Data about the device’s current whereabouts.
Despite the name, Location contains more than just the location of the
device. See the methods for all available information.
Implementations§
Source§impl Location<'_>
impl Location<'_>
pub fn coordinates(&self) -> Result<Coordinates>
pub fn altitude(&self) -> Result<f64>
Sourcepub fn bearing(&self) -> Result<f64>
pub fn bearing(&self) -> Result<f64>
The direction in which the device is travelling, measured in degrees and relative to due north.
Sourcepub fn speed(&self) -> Result<f64>
pub fn speed(&self) -> Result<f64>
The instantaneous speed of the device measured in meters per second.
Sourcepub fn time(&self) -> Result<SystemTime>
pub fn time(&self) -> Result<SystemTime>
The time at which the location was acquired.
This is not currently supported on Windows.
Auto Trait Implementations§
impl<'a> Freeze for Location<'a>
impl<'a> RefUnwindSafe for Location<'a>
impl<'a> Send for Location<'a>
impl<'a> Sync for Location<'a>
impl<'a> Unpin for Location<'a>
impl<'a> UnsafeUnpin for Location<'a>
impl<'a> UnwindSafe for Location<'a>
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