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.
pub fn set_credential<T: Into<Option<Credential>>>(self, v: T) -> Self
pub fn set_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self
Trait Implementations§
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§fn default() -> ClientConfig
fn default() -> ClientConfig
Returns the “default value” for a type. Read more
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