pub trait GeolocationManagerExt: 'static {
    fn failed(&self, error_message: &str);
    fn enables_high_accuracy(&self) -> bool;
    fn update_position(&self, position: &mut GeolocationPosition);
    fn connect_start<F: Fn(&Self) -> bool + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_stop<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_enable_high_accuracy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Available on crate feature v2_26 only.
Expand description

Trait containing all GeolocationManager methods.

Implementors

GeolocationManager

Required Methods

Notify self that determining the position failed.

error_message

the error message

Get whether high accuracy is enabled.

Returns

Whether the setting is enabled.

Notify self that position has been updated to position.

position

a GeolocationPosition

The signal is emitted to notify that manager needs to start receiving position updates. After this signal is emitted the user should provide the updates using update_position() every time the position changes, or use failed() in case it isn’t possible to determine the current position.

If the signal is not handled, WebKit will try to determine the position using GeoClue if available.

Returns

true to stop other handlers from being invoked for the event. false to propagate the event further.

The signal is emitted to notify that manager doesn’t need to receive position updates anymore.

Implementors