Struct leptos_use::UseGeolocationOptions
source · 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> 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>
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