pub struct ClientConfig { /* private fields */ }Expand description
Configure a client.
A client represents a connection to a Google Cloud Service. Each service has one or more client types. The default configuration for each client should work for most applications. But some applications may need to override the default endpoint, the default authentication credentials, the retry policies, and/or other behaviors of the client.
Implementations§
Source§impl ClientConfig
 
impl ClientConfig
Sourcepub fn new() -> Self
 
pub fn new() -> Self
Returns a default ClientConfig.
pub fn tracing_enabled(&self) -> bool
Sourcepub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
 
pub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
Sets an endpoint that overrides the default endpoint for a service.
Sourcepub fn enable_tracing(self) -> Self
 
pub fn enable_tracing(self) -> Self
Enables tracing.
Sourcepub fn disable_tracing(self) -> Self
 
pub fn disable_tracing(self) -> Self
Disables tracing.
Sourcepub fn set_credential<T: Into<Option<Credential>>>(self, v: T) -> Self
 
pub fn set_credential<T: Into<Option<Credential>>>(self, v: T) -> Self
Configure the authentication credentials.
Sourcepub fn set_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self
 
pub fn set_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self
Configure the retry policy.
Sourcepub fn set_backoff_policy<V: Into<BackoffPolicyArg>>(self, v: V) -> Self
 
pub fn set_backoff_policy<V: Into<BackoffPolicyArg>>(self, v: V) -> Self
Configure the retry backoff policy.
Sourcepub fn set_retry_throttler<V: Into<RetryThrottlerArg>>(self, v: V) -> Self
 
pub fn set_retry_throttler<V: Into<RetryThrottlerArg>>(self, v: V) -> Self
Configure the retry throttler.
Sourcepub fn set_polling_policy<V: Into<PollingPolicyArg>>(self, v: V) -> Self
 
pub fn set_polling_policy<V: Into<PollingPolicyArg>>(self, v: V) -> Self
Configure the polling backoff policy.
Sourcepub fn set_polling_backoff_policy<V: Into<PollingBackoffPolicyArg>>(
    self,
    v: V,
) -> Self
 
pub fn set_polling_backoff_policy<V: Into<PollingBackoffPolicyArg>>( self, v: V, ) -> Self
Configure the polling backoff policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientConfig
impl !RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl !UnwindSafe for ClientConfig
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