pub struct Geolocation { /* private fields */ }Expand description
Thread-safe Geolocation controller.
Implementations§
Source§impl Geolocation
impl Geolocation
pub fn new() -> Self
Sourcepub fn set_mock_position(&self, coords: GeoCoordinates)
pub fn set_mock_position(&self, coords: GeoCoordinates)
Configures or injects a mock coordinate (e.g. for testing or headless simulation).
Sourcepub fn get_current_position(
&self,
) -> Result<GeolocationPosition, GeolocationError>
pub fn get_current_position( &self, ) -> Result<GeolocationPosition, GeolocationError>
Retrieves the current device position snapshot.
Trait Implementations§
Source§impl Clone for Geolocation
impl Clone for Geolocation
Auto Trait Implementations§
impl Forget for Geolocation
impl Freeze for Geolocation
impl Move for Geolocation
impl RefUnwindSafe for Geolocation
impl Send for Geolocation
impl Sync for Geolocation
impl Unpin for Geolocation
impl UnsafeUnpin for Geolocation
impl UnwindSafe for Geolocation
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