pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub fn new(options: ClientOptions) -> Result<Client, ClientError>
pub fn new(options: ClientOptions) -> Result<Client, ClientError>
Create a new client using the supplied options.
§Errors
Returns an error if invalid ClientOptions are provided.
Sourcepub async fn fetch_weather(
&self,
query: &dyn Query,
) -> Result<CurrentWeather, ApiCallError>
pub async fn fetch_weather( &self, query: &dyn Query, ) -> Result<CurrentWeather, ApiCallError>
Fetch the weather for the provided Query.
§Errors
May fail for a variety of reasons, See ApiCallError.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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