pub struct RuntimeComponentsBuilder { /* private fields */ }
Expand description
Builder for RuntimeComponents
.
Implementations§
source§impl RuntimeComponentsBuilder
impl RuntimeComponentsBuilder
sourcepub const fn new(name: &'static str) -> Self
pub const fn new(name: &'static str) -> Self
Creates a new builder.
Since multiple builders are merged together to make the final RuntimeComponents
,
all components added by this builder are associated with the given name
so that
the origin of a component can be easily found when debugging.
sourcepub fn merge_from(self, other: &Self) -> Self
pub fn merge_from(self, other: &Self) -> Self
Merge in components from another builder.
sourcepub fn build(self) -> Result<RuntimeComponents, BuildError>
pub fn build(self) -> Result<RuntimeComponents, BuildError>
Builds RuntimeComponents
from this builder.
source§impl RuntimeComponentsBuilder
impl RuntimeComponentsBuilder
sourcepub fn auth_scheme_option_resolver(
&self
) -> Option<SharedAuthSchemeOptionResolver>
pub fn auth_scheme_option_resolver( &self ) -> Option<SharedAuthSchemeOptionResolver>
Returns the auth scheme option resolver.
sourcepub fn set_auth_scheme_option_resolver(
&mut self,
auth_scheme_option_resolver: Option<SharedAuthSchemeOptionResolver>
) -> &mut Self
pub fn set_auth_scheme_option_resolver( &mut self, auth_scheme_option_resolver: Option<SharedAuthSchemeOptionResolver> ) -> &mut Self
Sets the auth scheme option resolver.
sourcepub fn with_auth_scheme_option_resolver(
self,
auth_scheme_option_resolver: Option<SharedAuthSchemeOptionResolver>
) -> Self
pub fn with_auth_scheme_option_resolver( self, auth_scheme_option_resolver: Option<SharedAuthSchemeOptionResolver> ) -> Self
Sets the auth scheme option resolver.
sourcepub fn http_connector(&self) -> Option<SharedHttpConnector>
pub fn http_connector(&self) -> Option<SharedHttpConnector>
Returns the HTTP connector.
sourcepub fn set_http_connector(
&mut self,
connector: Option<SharedHttpConnector>
) -> &mut Self
pub fn set_http_connector( &mut self, connector: Option<SharedHttpConnector> ) -> &mut Self
Sets the HTTP connector.
sourcepub fn with_http_connector(self, connector: Option<SharedHttpConnector>) -> Self
pub fn with_http_connector(self, connector: Option<SharedHttpConnector>) -> Self
Sets the HTTP connector.
sourcepub fn endpoint_resolver(&self) -> Option<SharedEndpointResolver>
pub fn endpoint_resolver(&self) -> Option<SharedEndpointResolver>
Returns the endpoint resolver.
sourcepub fn set_endpoint_resolver(
&mut self,
endpoint_resolver: Option<SharedEndpointResolver>
) -> &mut Self
pub fn set_endpoint_resolver( &mut self, endpoint_resolver: Option<SharedEndpointResolver> ) -> &mut Self
Sets the endpoint resolver.
sourcepub fn with_endpoint_resolver(
self,
endpoint_resolver: Option<SharedEndpointResolver>
) -> Self
pub fn with_endpoint_resolver( self, endpoint_resolver: Option<SharedEndpointResolver> ) -> Self
Sets the endpoint resolver.
sourcepub fn auth_schemes(&self) -> impl Iterator<Item = SharedAuthScheme> + '_
pub fn auth_schemes(&self) -> impl Iterator<Item = SharedAuthScheme> + '_
Returns the auth schemes.
sourcepub fn push_auth_scheme(&mut self, auth_scheme: SharedAuthScheme) -> &mut Self
pub fn push_auth_scheme(&mut self, auth_scheme: SharedAuthScheme) -> &mut Self
Adds an auth scheme.
sourcepub fn with_auth_scheme(self, auth_scheme: SharedAuthScheme) -> Self
pub fn with_auth_scheme(self, auth_scheme: SharedAuthScheme) -> Self
Adds an auth scheme.
sourcepub fn push_identity_resolver(
&mut self,
scheme_id: AuthSchemeId,
identity_resolver: SharedIdentityResolver
) -> &mut Self
pub fn push_identity_resolver( &mut self, scheme_id: AuthSchemeId, identity_resolver: SharedIdentityResolver ) -> &mut Self
Adds an identity resolver.
sourcepub fn with_identity_resolver(
self,
scheme_id: AuthSchemeId,
identity_resolver: SharedIdentityResolver
) -> Self
pub fn with_identity_resolver( self, scheme_id: AuthSchemeId, identity_resolver: SharedIdentityResolver ) -> Self
Adds an identity resolver.
sourcepub fn interceptors(&self) -> impl Iterator<Item = SharedInterceptor> + '_
pub fn interceptors(&self) -> impl Iterator<Item = SharedInterceptor> + '_
Returns the interceptors.
sourcepub fn extend_interceptors(
&mut self,
interceptors: impl Iterator<Item = SharedInterceptor>
) -> &mut Self
pub fn extend_interceptors( &mut self, interceptors: impl Iterator<Item = SharedInterceptor> ) -> &mut Self
Adds all the given interceptors.
sourcepub fn push_interceptor(&mut self, interceptor: SharedInterceptor) -> &mut Self
pub fn push_interceptor(&mut self, interceptor: SharedInterceptor) -> &mut Self
Adds an interceptor.
sourcepub fn with_interceptor(self, interceptor: SharedInterceptor) -> Self
pub fn with_interceptor(self, interceptor: SharedInterceptor) -> Self
Adds an interceptor.
sourcepub fn set_interceptors(
&mut self,
interceptors: impl Iterator<Item = SharedInterceptor>
) -> &mut Self
pub fn set_interceptors( &mut self, interceptors: impl Iterator<Item = SharedInterceptor> ) -> &mut Self
Directly sets the interceptors and clears out any that were previously pushed.
sourcepub fn with_interceptors(
self,
interceptors: impl Iterator<Item = SharedInterceptor>
) -> Self
pub fn with_interceptors( self, interceptors: impl Iterator<Item = SharedInterceptor> ) -> Self
Directly sets the interceptors and clears out any that were previously pushed.
sourcepub fn retry_classifiers(&self) -> Option<&RetryClassifiers>
pub fn retry_classifiers(&self) -> Option<&RetryClassifiers>
Returns the retry classifiers.
sourcepub fn set_retry_classifiers(
&mut self,
retry_classifiers: Option<RetryClassifiers>
) -> &mut Self
pub fn set_retry_classifiers( &mut self, retry_classifiers: Option<RetryClassifiers> ) -> &mut Self
Sets the retry classifiers.
sourcepub fn with_retry_classifiers(
self,
retry_classifiers: Option<RetryClassifiers>
) -> Self
pub fn with_retry_classifiers( self, retry_classifiers: Option<RetryClassifiers> ) -> Self
Sets the retry classifiers.
sourcepub fn retry_strategy(&self) -> Option<SharedRetryStrategy>
pub fn retry_strategy(&self) -> Option<SharedRetryStrategy>
Returns the retry strategy.
sourcepub fn set_retry_strategy(
&mut self,
retry_strategy: Option<SharedRetryStrategy>
) -> &mut Self
pub fn set_retry_strategy( &mut self, retry_strategy: Option<SharedRetryStrategy> ) -> &mut Self
Sets the retry strategy.
sourcepub fn with_retry_strategy(
self,
retry_strategy: Option<SharedRetryStrategy>
) -> Self
pub fn with_retry_strategy( self, retry_strategy: Option<SharedRetryStrategy> ) -> Self
Sets the retry strategy.
sourcepub fn sleep_impl(&self) -> Option<SharedAsyncSleep>
pub fn sleep_impl(&self) -> Option<SharedAsyncSleep>
Returns the async sleep implementation.
sourcepub fn set_sleep_impl(
&mut self,
sleep_impl: Option<SharedAsyncSleep>
) -> &mut Self
pub fn set_sleep_impl( &mut self, sleep_impl: Option<SharedAsyncSleep> ) -> &mut Self
Sets the async sleep implementation.
sourcepub fn with_sleep_impl(self, sleep_impl: Option<SharedAsyncSleep>) -> Self
pub fn with_sleep_impl(self, sleep_impl: Option<SharedAsyncSleep>) -> Self
Sets the async sleep implementation.
sourcepub fn time_source(&self) -> Option<SharedTimeSource>
pub fn time_source(&self) -> Option<SharedTimeSource>
Returns the time source.
sourcepub fn set_time_source(
&mut self,
time_source: Option<SharedTimeSource>
) -> &mut Self
pub fn set_time_source( &mut self, time_source: Option<SharedTimeSource> ) -> &mut Self
Sets the time source.
sourcepub fn with_time_source(self, time_source: Option<SharedTimeSource>) -> Self
pub fn with_time_source(self, time_source: Option<SharedTimeSource>) -> Self
Sets the time source.
Trait Implementations§
source§impl Clone for RuntimeComponentsBuilder
impl Clone for RuntimeComponentsBuilder
source§fn clone(&self) -> RuntimeComponentsBuilder
fn clone(&self) -> RuntimeComponentsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more