/// Cause all later calls to sometimes return an error.
Cause all later calls to sometimes return an error.
Cause all later calls to sometimes return an error .
pub fn partially_available(&self, should_happen: f64, should_timeout: f64) {
        assert!(should_happen >= 0.0);
        assert!(should_happen <= 1.0);
        assert!(should_timeout >= 0.0);
        assert!(should_timeout <= 1.0);
        let mut core = self.core.lock().expect("mutex poisoned");
        core.should_happen = should_happen;
        core.should_timeout = should_timeout;
    }
pub fn partially_available ( & self , should_happen : f64 , should_timeout : f64 ) { assert ! ( should_happen 0.0 ) ; assert ! ( should_happen 1.0 ) ; assert ! ( should_timeout 0.0 ) ; assert ! ( should_timeout 1.0 ) ; let mut core = self . core . lock ( ) . expect ( " " ) ; core . should_happen = should_happen ; core . should_timeout = should_timeout ; }
Cause all later calls to sometimes return an error.
Cause all later calls to sometimes return an error .
&self
should_happen
f64
should_timeout
f64