Struct leptos_use::UseGeolocationReturn
source · pub struct UseGeolocationReturn<ResumeFn, PauseFn>{
pub coords: Signal<Option<Coordinates>>,
pub located_at: Signal<Option<f64>>,
pub error: Signal<Option<PositionError>>,
pub resume: ResumeFn,
pub pause: PauseFn,
}
Expand description
Return type of use_geolocation
.
Fields§
§coords: Signal<Option<Coordinates>>
The coordinates of the current device like latitude and longitude.
See GeolocationCoordinates
..
located_at: Signal<Option<f64>>
The timestamp of the current coordinates.
error: Signal<Option<PositionError>>
The last error received from navigator.geolocation
.
resume: ResumeFn
Resume the geolocation watch.
pause: PauseFn
Pause the geolocation watch.
Auto Trait Implementations§
impl<ResumeFn, PauseFn> Freeze for UseGeolocationReturn<ResumeFn, PauseFn>
impl<ResumeFn, PauseFn> !RefUnwindSafe for UseGeolocationReturn<ResumeFn, PauseFn>
impl<ResumeFn, PauseFn> !Send for UseGeolocationReturn<ResumeFn, PauseFn>
impl<ResumeFn, PauseFn> !Sync for UseGeolocationReturn<ResumeFn, PauseFn>
impl<ResumeFn, PauseFn> Unpin for UseGeolocationReturn<ResumeFn, PauseFn>
impl<ResumeFn, PauseFn> !UnwindSafe for UseGeolocationReturn<ResumeFn, PauseFn>
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
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>
Converts
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>
Converts
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