pub struct ConnectionOptionsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ConnectionOptionsBuilder<S>
impl<S: State> ConnectionOptionsBuilder<S>
Sourcepub fn build(self) -> ConnectionOptionswhere
S: IsComplete,
pub fn build(self) -> ConnectionOptionswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn identity(
self,
value: impl Into<String>,
) -> ConnectionOptionsBuilder<SetIdentity<S>>
pub fn identity( self, value: impl Into<String>, ) -> ConnectionOptionsBuilder<SetIdentity<S>>
Sourcepub fn maybe_identity(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetIdentity<S>>
pub fn maybe_identity( self, value: Option<impl Into<String>>, ) -> ConnectionOptionsBuilder<SetIdentity<S>>
Sourcepub fn metrics_meter(
self,
value: TemporalMeter,
) -> ConnectionOptionsBuilder<SetMetricsMeter<S>>where
S::MetricsMeter: IsUnset,
pub fn metrics_meter(
self,
value: TemporalMeter,
) -> ConnectionOptionsBuilder<SetMetricsMeter<S>>where
S::MetricsMeter: IsUnset,
Optional (Some / Option setters).
When set, this client will record metrics using the provided meter. The meter can be obtained from temporalio_common::telemetry::TelemetryInstance::get_temporal_metric_meter.
Sourcepub fn maybe_metrics_meter(
self,
value: Option<TemporalMeter>,
) -> ConnectionOptionsBuilder<SetMetricsMeter<S>>where
S::MetricsMeter: IsUnset,
pub fn maybe_metrics_meter(
self,
value: Option<TemporalMeter>,
) -> ConnectionOptionsBuilder<SetMetricsMeter<S>>where
S::MetricsMeter: IsUnset,
Optional (Some / Option setters).
When set, this client will record metrics using the provided meter. The meter can be obtained from temporalio_common::telemetry::TelemetryInstance::get_temporal_metric_meter.
Sourcepub fn tls_options(
self,
value: TlsOptions,
) -> ConnectionOptionsBuilder<SetTlsOptions<S>>where
S::TlsOptions: IsUnset,
pub fn tls_options(
self,
value: TlsOptions,
) -> ConnectionOptionsBuilder<SetTlsOptions<S>>where
S::TlsOptions: IsUnset,
Optional (Some / Option setters).
If specified, use TLS as configured by the TlsOptions struct. If this is set core will attempt to use TLS when connecting to the Temporal server. Lang SDK is expected to pass any certs or keys as bytes, loading them from disk itself if needed.
Sourcepub fn maybe_tls_options(
self,
value: Option<TlsOptions>,
) -> ConnectionOptionsBuilder<SetTlsOptions<S>>where
S::TlsOptions: IsUnset,
pub fn maybe_tls_options(
self,
value: Option<TlsOptions>,
) -> ConnectionOptionsBuilder<SetTlsOptions<S>>where
S::TlsOptions: IsUnset,
Optional (Some / Option setters).
If specified, use TLS as configured by the TlsOptions struct. If this is set core will attempt to use TLS when connecting to the Temporal server. Lang SDK is expected to pass any certs or keys as bytes, loading them from disk itself if needed.
Sourcepub fn override_origin(
self,
value: Uri,
) -> ConnectionOptionsBuilder<SetOverrideOrigin<S>>where
S::OverrideOrigin: IsUnset,
pub fn override_origin(
self,
value: Uri,
) -> ConnectionOptionsBuilder<SetOverrideOrigin<S>>where
S::OverrideOrigin: IsUnset,
Optional (Some / Option setters).
If set, override the origin used when connecting. May be useful in rare situations where tls
verification needs to use a different name from what should be set as the :authority
header. If TlsOptions::domain is set, and this is not, this will be set to
https://<domain>, effectively making the :authority header consistent with the domain
override.
Sourcepub fn maybe_override_origin(
self,
value: Option<Uri>,
) -> ConnectionOptionsBuilder<SetOverrideOrigin<S>>where
S::OverrideOrigin: IsUnset,
pub fn maybe_override_origin(
self,
value: Option<Uri>,
) -> ConnectionOptionsBuilder<SetOverrideOrigin<S>>where
S::OverrideOrigin: IsUnset,
Optional (Some / Option setters).
If set, override the origin used when connecting. May be useful in rare situations where tls
verification needs to use a different name from what should be set as the :authority
header. If TlsOptions::domain is set, and this is not, this will be set to
https://<domain>, effectively making the :authority header consistent with the domain
override.
Sourcepub fn maybe_api_key(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetApiKey<S>>
pub fn maybe_api_key( self, value: Option<impl Into<String>>, ) -> ConnectionOptionsBuilder<SetApiKey<S>>
Sourcepub fn retry_options(
self,
value: RetryOptions,
) -> ConnectionOptionsBuilder<SetRetryOptions<S>>where
S::RetryOptions: IsUnset,
pub fn retry_options(
self,
value: RetryOptions,
) -> ConnectionOptionsBuilder<SetRetryOptions<S>>where
S::RetryOptions: IsUnset,
Optional (Some / Option setters). Default: <RetryOptions as Default>::default().
Retry configuration for the server client. Default is RetryOptions::default
Sourcepub fn maybe_retry_options(
self,
value: Option<RetryOptions>,
) -> ConnectionOptionsBuilder<SetRetryOptions<S>>where
S::RetryOptions: IsUnset,
pub fn maybe_retry_options(
self,
value: Option<RetryOptions>,
) -> ConnectionOptionsBuilder<SetRetryOptions<S>>where
S::RetryOptions: IsUnset,
Optional (Some / Option setters). Default: <RetryOptions as Default>::default().
Retry configuration for the server client. Default is RetryOptions::default
Sourcepub fn keep_alive(
self,
value: Option<ClientKeepAliveOptions>,
) -> ConnectionOptionsBuilder<SetKeepAlive<S>>
pub fn keep_alive( self, value: Option<ClientKeepAliveOptions>, ) -> ConnectionOptionsBuilder<SetKeepAlive<S>>
Sourcepub fn maybe_keep_alive(
self,
value: Option<Option<ClientKeepAliveOptions>>,
) -> ConnectionOptionsBuilder<SetKeepAlive<S>>
pub fn maybe_keep_alive( self, value: Option<Option<ClientKeepAliveOptions>>, ) -> ConnectionOptionsBuilder<SetKeepAlive<S>>
Sourcepub fn headers(
self,
value: HashMap<String, String>,
) -> ConnectionOptionsBuilder<SetHeaders<S>>
pub fn headers( self, value: HashMap<String, String>, ) -> ConnectionOptionsBuilder<SetHeaders<S>>
Optional (Some / Option setters).
HTTP headers to include on every RPC call.
These must be valid gRPC metadata keys, and must not be binary metadata keys (ending in `-bin). To set binary headers, use ConnectionOptions::binary_headers. Invalid header keys or values will cause an error to be returned when connecting.
Sourcepub fn maybe_headers(
self,
value: Option<HashMap<String, String>>,
) -> ConnectionOptionsBuilder<SetHeaders<S>>
pub fn maybe_headers( self, value: Option<HashMap<String, String>>, ) -> ConnectionOptionsBuilder<SetHeaders<S>>
Optional (Some / Option setters).
HTTP headers to include on every RPC call.
These must be valid gRPC metadata keys, and must not be binary metadata keys (ending in `-bin). To set binary headers, use ConnectionOptions::binary_headers. Invalid header keys or values will cause an error to be returned when connecting.
Sourcepub fn binary_headers(
self,
value: HashMap<String, Vec<u8>>,
) -> ConnectionOptionsBuilder<SetBinaryHeaders<S>>where
S::BinaryHeaders: IsUnset,
pub fn binary_headers(
self,
value: HashMap<String, Vec<u8>>,
) -> ConnectionOptionsBuilder<SetBinaryHeaders<S>>where
S::BinaryHeaders: IsUnset,
Sourcepub fn maybe_binary_headers(
self,
value: Option<HashMap<String, Vec<u8>>>,
) -> ConnectionOptionsBuilder<SetBinaryHeaders<S>>where
S::BinaryHeaders: IsUnset,
pub fn maybe_binary_headers(
self,
value: Option<HashMap<String, Vec<u8>>>,
) -> ConnectionOptionsBuilder<SetBinaryHeaders<S>>where
S::BinaryHeaders: IsUnset,
Sourcepub fn http_connect_proxy(
self,
value: HttpConnectProxyOptions,
) -> ConnectionOptionsBuilder<SetHttpConnectProxy<S>>where
S::HttpConnectProxy: IsUnset,
pub fn http_connect_proxy(
self,
value: HttpConnectProxyOptions,
) -> ConnectionOptionsBuilder<SetHttpConnectProxy<S>>where
S::HttpConnectProxy: IsUnset,
Sourcepub fn maybe_http_connect_proxy(
self,
value: Option<HttpConnectProxyOptions>,
) -> ConnectionOptionsBuilder<SetHttpConnectProxy<S>>where
S::HttpConnectProxy: IsUnset,
pub fn maybe_http_connect_proxy(
self,
value: Option<HttpConnectProxyOptions>,
) -> ConnectionOptionsBuilder<SetHttpConnectProxy<S>>where
S::HttpConnectProxy: IsUnset,
Sourcepub fn service_override(
self,
value: CallbackBasedGrpcService,
) -> ConnectionOptionsBuilder<SetServiceOverride<S>>where
S::ServiceOverride: IsUnset,
pub fn service_override(
self,
value: CallbackBasedGrpcService,
) -> ConnectionOptionsBuilder<SetServiceOverride<S>>where
S::ServiceOverride: IsUnset,
Sourcepub fn maybe_service_override(
self,
value: Option<CallbackBasedGrpcService>,
) -> ConnectionOptionsBuilder<SetServiceOverride<S>>where
S::ServiceOverride: IsUnset,
pub fn maybe_service_override(
self,
value: Option<CallbackBasedGrpcService>,
) -> ConnectionOptionsBuilder<SetServiceOverride<S>>where
S::ServiceOverride: IsUnset,
Sourcepub fn skip_get_system_info(
self,
value: bool,
) -> ConnectionOptionsBuilder<SetSkipGetSystemInfo<S>>where
S::SkipGetSystemInfo: IsUnset,
pub fn skip_get_system_info(
self,
value: bool,
) -> ConnectionOptionsBuilder<SetSkipGetSystemInfo<S>>where
S::SkipGetSystemInfo: IsUnset,
Sourcepub fn maybe_skip_get_system_info(
self,
value: Option<bool>,
) -> ConnectionOptionsBuilder<SetSkipGetSystemInfo<S>>where
S::SkipGetSystemInfo: IsUnset,
pub fn maybe_skip_get_system_info(
self,
value: Option<bool>,
) -> ConnectionOptionsBuilder<SetSkipGetSystemInfo<S>>where
S::SkipGetSystemInfo: IsUnset,
Sourcepub fn client_name(
self,
value: impl Into<String>,
) -> ConnectionOptionsBuilder<SetClientName<S>>where
S::ClientName: IsUnset,
pub fn client_name(
self,
value: impl Into<String>,
) -> ConnectionOptionsBuilder<SetClientName<S>>where
S::ClientName: IsUnset,
Sourcepub fn maybe_client_name(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetClientName<S>>where
S::ClientName: IsUnset,
pub fn maybe_client_name(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetClientName<S>>where
S::ClientName: IsUnset,
Sourcepub fn client_version(
self,
value: impl Into<String>,
) -> ConnectionOptionsBuilder<SetClientVersion<S>>where
S::ClientVersion: IsUnset,
pub fn client_version(
self,
value: impl Into<String>,
) -> ConnectionOptionsBuilder<SetClientVersion<S>>where
S::ClientVersion: IsUnset,
Sourcepub fn maybe_client_version(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetClientVersion<S>>where
S::ClientVersion: IsUnset,
pub fn maybe_client_version(
self,
value: Option<impl Into<String>>,
) -> ConnectionOptionsBuilder<SetClientVersion<S>>where
S::ClientVersion: IsUnset,
Auto Trait Implementations§
impl<S = Empty> !Freeze for ConnectionOptionsBuilder<S>
impl<S = Empty> !RefUnwindSafe for ConnectionOptionsBuilder<S>
impl<S> Send for ConnectionOptionsBuilder<S>
impl<S> Sync for ConnectionOptionsBuilder<S>
impl<S> Unpin for ConnectionOptionsBuilder<S>
impl<S> UnsafeUnpin for ConnectionOptionsBuilder<S>
impl<S = Empty> !UnwindSafe for ConnectionOptionsBuilder<S>
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
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