pub struct ClientBuilder { /* private fields */ }Expand description
A builder for Client.
Construct one with Client::builder, set the credentials and the
whitelisted client IP, then call build.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn api_user(self, value: impl Into<String>) -> Self
pub fn api_user(self, value: impl Into<String>) -> Self
Sets the API username (the ApiUser parameter).
Sourcepub fn api_key(self, value: impl Into<String>) -> Self
pub fn api_key(self, value: impl Into<String>) -> Self
Sets the API key (the ApiKey parameter).
Sourcepub fn user_name(self, value: impl Into<String>) -> Self
pub fn user_name(self, value: impl Into<String>) -> Self
Sets the account username (the UserName parameter).
When omitted, this defaults to the value of api_user.
It only differs when acting on behalf of another account.
Sourcepub fn client_ip(self, value: impl Into<String>) -> Self
pub fn client_ip(self, value: impl Into<String>) -> Self
Sets the whitelisted client IP (the ClientIp parameter).
This must be the public IPv4 address you have whitelisted in the Namecheap API settings, and it must match the address the request actually originates from.
Sourcepub fn environment(self, environment: Environment) -> Self
pub fn environment(self, environment: Environment) -> Self
Selects the Environment. Defaults to Environment::Production.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Supplies a preconfigured reqwest::Client (custom timeouts, proxy, and
so on). When omitted, a default client is created.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more