pub struct EnhancedClientBuilder { /* private fields */ }Expand description
Builder for enhanced client configuration
Implementations§
Source§impl EnhancedClientBuilder
impl EnhancedClientBuilder
Sourcepub fn max_connections_per_host(self, max: usize) -> Self
pub fn max_connections_per_host(self, max: usize) -> Self
Set maximum connections per host
Sourcepub fn min_connections_per_host(self, min: usize) -> Self
pub fn min_connections_per_host(self, min: usize) -> Self
Set minimum connections per host
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Set connection idle timeout
Sourcepub fn adaptive_pooling(self, enabled: bool) -> Self
pub fn adaptive_pooling(self, enabled: bool) -> Self
Enable or disable adaptive pooling
Sourcepub fn connection_warming(self, enabled: bool) -> Self
pub fn connection_warming(self, enabled: bool) -> Self
Enable or disable connection warming
Sourcepub fn health_check_interval(self, interval: Duration) -> Self
pub fn health_check_interval(self, interval: Duration) -> Self
Set health check interval
Sourcepub fn with_cache(self, cache_config: CacheConfig) -> Self
pub fn with_cache(self, cache_config: CacheConfig) -> Self
Enable response caching with configuration
Sourcepub fn with_default_cache(self) -> Self
pub fn with_default_cache(self) -> Self
Enable response caching with default configuration
Sourcepub fn with_circuit_breaker(
self,
circuit_breaker_config: EnhancedCircuitBreakerConfig,
) -> Self
pub fn with_circuit_breaker( self, circuit_breaker_config: EnhancedCircuitBreakerConfig, ) -> Self
Enable circuit breaker with configuration
Sourcepub fn with_default_circuit_breaker(self) -> Self
pub fn with_default_circuit_breaker(self) -> Self
Enable circuit breaker with default configuration
Sourcepub fn with_metrics(self, metrics_config: MetricsConfig) -> Self
pub fn with_metrics(self, metrics_config: MetricsConfig) -> Self
Enable metrics collection with configuration
Sourcepub fn with_default_metrics(self) -> Self
pub fn with_default_metrics(self) -> Self
Enable metrics collection with default configuration
Sourcepub fn build<E>(self, environment: E) -> Result<EnhancedClient<E>>
pub fn build<E>(self, environment: E) -> Result<EnhancedClient<E>>
Build enhanced client with environment and full configuration
§Errors
Returns an error if the enhanced client cannot be built with the specified configuration.
Trait Implementations§
Source§impl Clone for EnhancedClientBuilder
impl Clone for EnhancedClientBuilder
Source§fn clone(&self) -> EnhancedClientBuilder
fn clone(&self) -> EnhancedClientBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EnhancedClientBuilder
impl Debug for EnhancedClientBuilder
Auto Trait Implementations§
impl Freeze for EnhancedClientBuilder
impl RefUnwindSafe for EnhancedClientBuilder
impl Send for EnhancedClientBuilder
impl Sync for EnhancedClientBuilder
impl Unpin for EnhancedClientBuilder
impl UnwindSafe for EnhancedClientBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.