pub struct LoopWithBackoff {
pub prefix: Cow<'static, str>,
pub verbosity: LoopVerbosity,
pub quiet: bool,
pub error_sleep_factor: f64,
pub success_sleep_factor: f64,
pub min_sleep_seconds: f64,
pub max_sleep_seconds: f64,
}Expand description
Configuration data; implements Default so you can initialize an
instance setting only the fields that you want to change (most
likely only the *_sleep_seconds values).
Fields§
§prefix: Cow<'static, str>Prefix for the “loop iteration” and other “loop” messages; e.g. say what is being looped.
verbosity: LoopVerbosityWhether to enable additional diagnostic messages to stderr
(default: LoopVerbosity::LogSleepTimeEveryIteration).
quiet: boolWhether to silence diagnostic messages to stderr about errors (default: false).
error_sleep_factor: f64The number to multiply the sleep time with in case of error (should be > 1)
success_sleep_factor: f64The number to multiply the sleep time with in case of success (should be between 0 and 1)
min_sleep_seconds: f64The number of seconds to sleep at minimum (do not use 0 since then it will never back off!)
max_sleep_seconds: f64The number of seconds to sleep at maximum (should be >
min_sleep_seconds).