pub struct BreakerConfig {
pub failure_threshold: usize,
pub success_threshold: usize,
pub timeout: Duration,
pub enabled: bool,
}Expand description
Circuit breaker configuration
Fields§
§failure_threshold: usizeFailure threshold to open circuit
success_threshold: usizeSuccess threshold to close circuit
timeout: DurationTimeout for half-open state
enabled: boolEnable circuit breaker
Trait Implementations§
Source§impl Clone for BreakerConfig
impl Clone for BreakerConfig
Source§fn clone(&self) -> BreakerConfig
fn clone(&self) -> BreakerConfig
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 BreakerConfig
impl Debug for BreakerConfig
Source§impl Default for BreakerConfig
impl Default for BreakerConfig
Source§impl<'de> Deserialize<'de> for BreakerConfig
impl<'de> Deserialize<'de> for BreakerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BreakerConfig
impl PartialEq for BreakerConfig
Source§impl Serialize for BreakerConfig
impl Serialize for BreakerConfig
impl StructuralPartialEq for BreakerConfig
Auto Trait Implementations§
impl Freeze for BreakerConfig
impl RefUnwindSafe for BreakerConfig
impl Send for BreakerConfig
impl Sync for BreakerConfig
impl Unpin for BreakerConfig
impl UnwindSafe for BreakerConfig
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