Struct photon_geocoding::PhotonApiClient
source · [−]pub struct PhotonApiClient { /* private fields */ }Implementations
sourceimpl Client
impl Client
sourcepub fn new(base_url: &str) -> Self
pub fn new(base_url: &str) -> Self
Creates a new API client with the specified base_url.
base_url must begin with http:// or https://.
sourcepub fn forward_search(
&self,
query: &str,
filter: Option<ForwardFilter>
) -> Result<Vec<PhotonFeature>, Box<dyn Error>>
pub fn forward_search(
&self,
query: &str,
filter: Option<ForwardFilter>
) -> Result<Vec<PhotonFeature>, Box<dyn Error>>
Performs a forward search for the provided query.
Results can be filtered by the optional filter. Pass None for no filter.
The request is performed asynchronously.
sourcepub fn reverse_search(
&self,
coords: LatLon,
filter: Option<ReverseFilter>
) -> Result<Vec<PhotonFeature>, Box<dyn Error>>
pub fn reverse_search(
&self,
coords: LatLon,
filter: Option<ReverseFilter>
) -> Result<Vec<PhotonFeature>, Box<dyn Error>>
Performs a reverse search for objects at the specified coords.
Results can be filtered by the optional filter. Pass None for no filter.
The request is performed asynchronously.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more