pub struct AsyncGuardAdapterConfig {
pub circuit: CircuitBreakerConfig,
pub retry: RetryConfig,
pub cache_capacity: NonZero<usize>,
pub cache_ttl: Duration,
pub rate_per_second: f64,
pub rate_burst: u32,
pub circuit_open_verdict: CircuitOpenVerdict,
pub rate_limited_verdict: RateLimitedVerdict,
}Expand description
Configuration for AsyncGuardAdapter. Built via
AsyncGuardAdapter::builder.
Fields§
§circuit: CircuitBreakerConfigCircuit breaker tuning.
retry: RetryConfigRetry configuration applied inside the breaker.
cache_capacity: NonZero<usize>Maximum number of cached verdicts.
cache_ttl: DurationTTL applied to every cached verdict.
rate_per_second: f64Rate limit (calls per second).
rate_burst: u32Burst capacity for the rate limiter.
circuit_open_verdict: CircuitOpenVerdictVerdict returned when the breaker is open.
rate_limited_verdict: RateLimitedVerdictVerdict returned when the rate limiter rejects a call.
Trait Implementations§
Source§impl Clone for AsyncGuardAdapterConfig
impl Clone for AsyncGuardAdapterConfig
Source§fn clone(&self) -> AsyncGuardAdapterConfig
fn clone(&self) -> AsyncGuardAdapterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AsyncGuardAdapterConfig
impl Debug for AsyncGuardAdapterConfig
Source§impl Default for AsyncGuardAdapterConfig
impl Default for AsyncGuardAdapterConfig
Source§fn default() -> AsyncGuardAdapterConfig
fn default() -> AsyncGuardAdapterConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AsyncGuardAdapterConfig
impl RefUnwindSafe for AsyncGuardAdapterConfig
impl Send for AsyncGuardAdapterConfig
impl Sync for AsyncGuardAdapterConfig
impl Unpin for AsyncGuardAdapterConfig
impl UnsafeUnpin for AsyncGuardAdapterConfig
impl UnwindSafe for AsyncGuardAdapterConfig
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
Mutably borrows from an owned value. Read more