pub trait LocationExt: 'static {
// Required methods
fn is_available(&self) -> bool;
async fn init(&self) -> Result<(), LocationError>;
async fn updates_stream(
&self,
) -> Result<impl Stream<Item = GeoUri> + '_, LocationError>;
}
Required Methods§
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Whether the location API is available.
Sourceasync fn init(&self) -> Result<(), LocationError>
async fn init(&self) -> Result<(), LocationError>
Initialize the location API.
Sourceasync fn updates_stream(
&self,
) -> Result<impl Stream<Item = GeoUri> + '_, LocationError>
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", so this trait is not object safe.