pub struct GeocodioProxy {
pub base_url: Url,
/* private fields */
}
Fields§
§base_url: Url
Implementations§
Source§impl GeocodioProxy
impl GeocodioProxy
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Instantiate new GeocodioProxy API client from .env GEOCODIO_API_KEY variable
Sourcepub fn new_from_key(api_key: String) -> Result<Self, Error>
pub fn new_from_key(api_key: String) -> Result<Self, Error>
Instantiate new GeocodioProxy API client by passing api key
Sourcepub async fn request(
&self,
endpoint: &str,
params: &str,
) -> Result<Response, Error>
pub async fn request( &self, endpoint: &str, params: &str, ) -> Result<Response, Error>
Helper function to wrap the request
Sourcepub async fn geocode(
&self,
address: AddressParams,
fields: Option<&[&str]>,
) -> Result<GeocodeResponse, Error>
pub async fn geocode( &self, address: AddressParams, fields: Option<&[&str]>, ) -> Result<GeocodeResponse, Error>
Geocode a single address
Auto Trait Implementations§
impl Freeze for GeocodioProxy
impl !RefUnwindSafe for GeocodioProxy
impl Send for GeocodioProxy
impl Sync for GeocodioProxy
impl Unpin for GeocodioProxy
impl !UnwindSafe for GeocodioProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more