Skip to main content

LocationExt

Trait LocationExt 

Source
pub(crate) trait LocationExt {
    // Required methods
    fn is_available(&self) -> bool;
    async fn init(&self) -> Result<(), LocationError>;
    async fn updates_stream(
        &self,
    ) -> Result<impl Stream<Item = GeoUri> + '_, LocationError>;
}
Expand description

Trait implemented by location backends.

Required Methods§

Source

fn is_available(&self) -> bool

Whether the location API is available.

Source

async fn init(&self) -> Result<(), LocationError>

Initialize the location API.

Source

async fn updates_stream( &self, ) -> Result<impl Stream<Item = GeoUri> + '_, LocationError>

Listen to a stream of location updates.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§