pub fn new(config: Config) -> Result<CircuitBreaker, CriusError> {
        Window::new(config)
            .map(|window| CircuitBreaker {
                circuit_breaker_stats: CircuitBreakerStats { window },
                circuit_open_time: None,
                config,
            })
            .ok_or(CriusError::InvalidConfig)
    }
/// Attempt to create a circuit breaker from the given
/// configuration. This may return `None` if the configuration is
/// invalid (e.g. if the configured durations overflow).
Attempt to create a circuit breaker from the given
configuration. This may return `None` if the configuration is
invalid .
Attempt to create a circuit breaker from the given configuration . This may return ` None ` if the configuration is invalid .
pub fn new(config: Config) -> Result<CircuitBreaker, CriusError> {
        Window::new(config)
            .map(|window| CircuitBreaker {
                circuit_breaker_stats: CircuitBreakerStats { window },
                circuit_open_time: None,
                config,
            })
            .ok_or(CriusError::InvalidConfig)
    }
pub fn new ( config : Config ) -> Result < CircuitBreaker , CriusError > { Window :: new ( config ) . map ( | window | CircuitBreaker { circuit_breaker_stats : CircuitBreakerStats { window } , circuit_open_time : None , config , } ) . ok_or ( CriusError :: InvalidConfig ) }
Attempt to create a circuit breaker from the given
configuration.
Attempt to create a circuit breaker from the given configuration .
config
Config