Skip to main content

Module client_builder

Module client_builder 

Source
Expand description

Provide types for client construction.

Some applications need to construct clients with custom configuration, for example, they may need to override the endpoint or the authentication credentials. The Google Cloud client libraries for Rust use a generic builder type to provide such functionality. The types in this module implement the client builders.

Applications should not create builders directly, instead each client type defines a builder() function to obtain the correct type of builder.

§Example: create a client with the default configuration.

pub use examples::Client; // Placeholder for examples
let client = Client::builder().build().await?;

§Example: create a client with a different endpoint

pub use examples::Client; // Placeholder for examples
let client = Client::builder()
    .with_endpoint("https://private.googleapis.com")
    .build().await?;

Structs§

ClientBuilder
A generic builder for clients.
Error
Indicates a problem while constructing a client.
Extensions
A type-erased map of configuration extensions.

Type Aliases§

Result
The result type for this module.