Trait fractal::utils::location::LocationImpl
source · pub trait LocationImpl: ObjectImpl {
// Provided 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
Public trait that must be implemented for everything that derives from
Location
.
Overriding a method from this Trait overrides also its behavior in
LocationExt
.
Provided 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.
Object Safety§
This trait is not object safe.