pub struct GeolocationEffects<'a, 'b, S: AppState> { /* private fields */ }Expand description
Convenience builder for standard geolocation host capabilities.
Implementations§
Source§impl<'a, 'b, S: AppState> GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S: AppState> GeolocationEffects<'a, 'b, S>
Sourcepub fn permission(self) -> EffectBuilder<'a, 'b, S>
pub fn permission(self) -> EffectBuilder<'a, 'b, S>
Reads the current geolocation permission state without showing a prompt.
Use this to decide whether a screen should show a request button, an explanation, or a platform-settings hint. The result is host-reported and may change outside the app.
Sourcepub fn request_permission(
self,
request: GeolocationPermissionRequest,
) -> EffectBuilder<'a, 'b, S>
pub fn request_permission( self, request: GeolocationPermissionRequest, ) -> EffectBuilder<'a, 'b, S>
Requests geolocation permission from the host.
request.precise asks for precise coordinates when the platform exposes a
precise/approximate distinction. request.background should only be set
for product flows that genuinely need background location and have matching
platform configuration.
Sourcepub fn current_position(
self,
request: GeolocationPositionRequest,
) -> EffectBuilder<'a, 'b, S>
pub fn current_position( self, request: GeolocationPositionRequest, ) -> EffectBuilder<'a, 'b, S>
Requests the current location from the host.
request.high_accuracy, timeout_ms, and maximum_age_ms let the app
trade precision, speed, power use, and cached values. The success action
receives latitude, longitude, accuracy, and optional motion metadata.
Auto Trait Implementations§
impl<'a, 'b, S> Freeze for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> !RefUnwindSafe for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> Send for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> Sync for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> Unpin for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> UnsafeUnpin for GeolocationEffects<'a, 'b, S>
impl<'a, 'b, S> !UnwindSafe for GeolocationEffects<'a, 'b, S>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.