pub struct ClientConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ClientConfigBuilder<S>
impl<S: State> ClientConfigBuilder<S>
Sourcepub fn build(self) -> ClientConfigwhere
S: IsComplete,
pub fn build(self) -> ClientConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn client_key(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetClientKey<S>>where
S::ClientKey: IsUnset,
pub fn client_key(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetClientKey<S>>where
S::ClientKey: IsUnset,
Sourcepub fn maybe_client_key(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetClientKey<S>>where
S::ClientKey: IsUnset,
pub fn maybe_client_key(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetClientKey<S>>where
S::ClientKey: IsUnset,
Sourcepub fn async_base_url(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetAsyncBaseUrl<S>>where
S::AsyncBaseUrl: IsUnset,
pub fn async_base_url(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetAsyncBaseUrl<S>>where
S::AsyncBaseUrl: IsUnset,
Optional (Some / Option setters).
Default: DEFAULT_ASYNC_BASE_URL.to_owned().
Base URL for asynchronous task operations and balance queries.
Override it to reach a private gateway, or to point the client at a test
server. The service splits the two deployments, so they cannot share one
host — see Self::sync_base_url.
Sourcepub fn maybe_async_base_url(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetAsyncBaseUrl<S>>where
S::AsyncBaseUrl: IsUnset,
pub fn maybe_async_base_url(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetAsyncBaseUrl<S>>where
S::AsyncBaseUrl: IsUnset,
Optional (Some / Option setters).
Default: DEFAULT_ASYNC_BASE_URL.to_owned().
Base URL for asynchronous task operations and balance queries.
Override it to reach a private gateway, or to point the client at a test
server. The service splits the two deployments, so they cannot share one
host — see Self::sync_base_url.
Sourcepub fn sync_base_url(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetSyncBaseUrl<S>>where
S::SyncBaseUrl: IsUnset,
pub fn sync_base_url(
self,
value: impl Into<String>,
) -> ClientConfigBuilder<SetSyncBaseUrl<S>>where
S::SyncBaseUrl: IsUnset,
Sourcepub fn maybe_sync_base_url(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetSyncBaseUrl<S>>where
S::SyncBaseUrl: IsUnset,
pub fn maybe_sync_base_url(
self,
value: Option<impl Into<String>>,
) -> ClientConfigBuilder<SetSyncBaseUrl<S>>where
S::SyncBaseUrl: IsUnset,
Sourcepub fn timeout(self, value: Duration) -> ClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn timeout(self, value: Duration) -> ClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
Sourcepub fn maybe_timeout(
self,
value: Option<Duration>,
) -> ClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn maybe_timeout(
self,
value: Option<Duration>,
) -> ClientConfigBuilder<SetTimeout<S>>where
S::Timeout: IsUnset,
Sourcepub fn sync_timeout(
self,
value: Duration,
) -> ClientConfigBuilder<SetSyncTimeout<S>>where
S::SyncTimeout: IsUnset,
pub fn sync_timeout(
self,
value: Duration,
) -> ClientConfigBuilder<SetSyncTimeout<S>>where
S::SyncTimeout: IsUnset,
Optional (Some / Option setters).
Default: DEFAULT_SYNC_TIMEOUT.
Timeout applied to the synchronous task endpoint.
A synchronous call blocks until the worker answers, and the service grants some task types a three-minute worker deadline. Sharing the asynchronous timeout would abort a call the service is still billing for, and a call that times out never receives the task ID it would take to recover the result.
Sourcepub fn maybe_sync_timeout(
self,
value: Option<Duration>,
) -> ClientConfigBuilder<SetSyncTimeout<S>>where
S::SyncTimeout: IsUnset,
pub fn maybe_sync_timeout(
self,
value: Option<Duration>,
) -> ClientConfigBuilder<SetSyncTimeout<S>>where
S::SyncTimeout: IsUnset,
Optional (Some / Option setters).
Default: DEFAULT_SYNC_TIMEOUT.
Timeout applied to the synchronous task endpoint.
A synchronous call blocks until the worker answers, and the service grants some task types a three-minute worker deadline. Sharing the asynchronous timeout would abort a call the service is still billing for, and a call that times out never receives the task ID it would take to recover the result.