pub struct ClientFactory { /* private fields */ }Expand description
Allows us to create clients.
reqwest already has a ClientBuilder, however it is unable to be cloned. Also it is not
possible to get a ClientBuilder from an existing Client. So we need to re-create all builders
and clients.
Implementations§
Source§impl ClientFactory
impl ClientFactory
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new client factory from a default ClientConfig.
pub fn make_insecure(self) -> Self
pub fn add_ca_cert<P: Into<PathBuf>>(self, path: P) -> Self
pub fn add_ca_certs<I, P>(self, paths: I) -> Self
pub fn new_builder(&self) -> Result<ClientBuilder>
pub fn new_client(&self) -> Result<Client>
Trait Implementations§
Source§impl Clone for ClientFactory
impl Clone for ClientFactory
Source§fn clone(&self) -> ClientFactory
fn clone(&self) -> ClientFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientFactory
impl Debug for ClientFactory
Source§impl Default for ClientFactory
impl Default for ClientFactory
Source§fn default() -> ClientFactory
fn default() -> ClientFactory
Returns the “default value” for a type. Read more
Source§impl From<ClientConfig> for ClientFactory
impl From<ClientConfig> for ClientFactory
Source§fn from(config: ClientConfig) -> Self
fn from(config: ClientConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ClientFactory
impl PartialEq for ClientFactory
impl Eq for ClientFactory
impl StructuralPartialEq for ClientFactory
Auto Trait Implementations§
impl Freeze for ClientFactory
impl RefUnwindSafe for ClientFactory
impl Send for ClientFactory
impl Sync for ClientFactory
impl Unpin for ClientFactory
impl UnwindSafe for ClientFactory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.