pub struct ClientBuilder { /* private fields */ }Expand description
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new default ClientBuilder.
Sourcepub fn with_project_id<V: Into<String>>(self, project_id: V) -> Self
pub fn with_project_id<V: Into<String>>(self, project_id: V) -> Self
Sets the default Google Cloud project ID for the client.
§Example
let client = BigQuery::builder()
.with_project_id("my-project-id")
.build()
.await?;Sourcepub fn with_endpoint<V: Into<String>>(self, v: V) -> Self
pub fn with_endpoint<V: Into<String>>(self, v: V) -> Self
Sets the BigQuery v2 API endpoint.
§Example
let client = BigQuery::builder()
.with_endpoint("https://private.googleapis.com")
.build()
.await?;Sourcepub fn with_credentials<V: Into<Credentials>>(self, credentials: V) -> Self
pub fn with_credentials<V: Into<Credentials>>(self, credentials: V) -> Self
Configure the authentication credentials.
Most Google Cloud services require authentication, though some services allow for anonymous access, and some services provide emulators where no authentication is required. More information about valid credentials types can be found in the google-cloud-auth crate documentation.
§Example
use google_cloud_auth::credentials::mds;
let client = BigQuery::builder()
.with_credentials(
mds::Builder::default()
.with_scopes(["https://www.googleapis.com/auth/cloud-platform.read-only"])
.build()?)
.build()
.await?;Sourcepub fn with_universe_domain<V: Into<String>>(self, v: V) -> Self
pub fn with_universe_domain<V: Into<String>>(self, v: V) -> Self
Configure the universe domain.
The universe domain is the default service domain for a given cloud universe. The default value is “googleapis.com”.
§Example
let client = BigQuery::builder()
.with_universe_domain("googleapis.com")
.build()
.await?;Sourcepub fn with_tracing(self) -> Self
pub fn with_tracing(self) -> Self
Sourcepub fn with_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self
pub fn with_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self
Configure the retry policy.
The client libraries can automatically retry operations that fail. The retry policy controls what errors are considered retryable, sets limits on the number of attempts or the time trying to make attempts.
§Example
use google_cloud_bigquery::query::retry_policy::RetryableErrors;
use google_cloud_gax::retry_policy::RetryPolicyExt;
let client = BigQuery::builder()
.with_retry_policy(RetryableErrors.with_attempt_limit(3))
.build()
.await?;Sourcepub fn with_backoff_policy<V: Into<BackoffPolicyArg>>(self, v: V) -> Self
pub fn with_backoff_policy<V: Into<BackoffPolicyArg>>(self, v: V) -> Self
Configure the retry backoff policy.
The client libraries can automatically retry operations that fail. The backoff policy controls how long to wait in between retry attempts.
§Example
use google_cloud_gax::exponential_backoff::ExponentialBackoff;
use std::time::Duration;
let policy = ExponentialBackoff::default();
let client = BigQuery::builder()
.with_backoff_policy(policy)
.build()
.await?;Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl Freeze for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request