diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-21 17:25:44 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-21 17:25:44 +0200 |
commit | e524ba7744f74856645e081f77d3ba9c09c862ca (patch) | |
tree | cd152757218d8f21f107454114dd9bdc5343a784 /src | |
parent | e332e9d4a468b3a97c4d8b91394070a5ac98c916 (diff) |
add client
Diffstat (limited to 'src')
-rw-r--r-- | src/client.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs index f0a06f3..3153254 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,5 +1,7 @@ use crate::{Error, Result}; +use std::sync::Arc; + use reqwest::Url; /// The INWX environment to use. The Sandbox is good for testing @@ -25,3 +27,18 @@ impl TryInto<Url> for Endpoint { Ok(url) } } + +/// A synchronous client to make API calls with. +/// You do **not** need to wrap it in an `Arc` or `Rc` +/// because it already uses an `Arc` internally. +/// [`Rc`]: std::rc::Rc +pub struct Client { + inner: Arc<ClientRef>, +} + +impl Client {} + +// The underlying data of a `Client`. +struct ClientRef { + http: reqwest::Client, +} |