pub struct UseGeolocationOptions { /* private fields */ }Expand description
Options for use_geolocation_with_options.
Implementations§
Source§impl UseGeolocationOptions
impl UseGeolocationOptions
Sourcepub fn immediate(self, value: bool) -> Self
pub fn immediate(self, value: bool) -> Self
If true the geolocation watch is started when this function is called.
If false you have to call resume manually to start it. Defaults to true.
Sourcepub fn enable_high_accuracy(self, value: bool) -> Self
pub fn enable_high_accuracy(self, value: bool) -> Self
A boolean value that indicates the application would like to receive the best
possible results. If true and if the device is able to provide a more accurate
position, it will do so. Note that this can result in slower response times or
increased power consumption (with a GPS chip on a mobile device for example).
On the other hand, if false, the device can take the liberty to save
resources by responding more quickly and/or using less power. Default: false.
Sourcepub fn maximum_age(self, value: u32) -> Self
pub fn maximum_age(self, value: u32) -> Self
A positive value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return.
If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position.
Default: 30000.
Trait Implementations§
Source§impl Clone for UseGeolocationOptions
impl Clone for UseGeolocationOptions
Source§fn clone(&self) -> UseGeolocationOptions
fn clone(&self) -> UseGeolocationOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for UseGeolocationOptions
impl RefUnwindSafe for UseGeolocationOptions
impl Send for UseGeolocationOptions
impl Sync for UseGeolocationOptions
impl Unpin for UseGeolocationOptions
impl UnwindSafe for UseGeolocationOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more