pub trait Timeout: Send + 'static {
// Required methods
fn get_timeout(&self, size: usize, retries: usize) -> Duration;
fn update(&mut self, _: &RequestReport);
fn get_estimate(&self) -> f64;
}
Required Methods§
Sourcefn get_timeout(&self, size: usize, retries: usize) -> Duration
fn get_timeout(&self, size: usize, retries: usize) -> Duration
Size is in either bytes or objects, depending on the type of requests.
Sourcefn update(&mut self, _: &RequestReport)
fn update(&mut self, _: &RequestReport)
Update the internal estimate of the extra timeout per unit of size
Sourcefn get_estimate(&self) -> f64
fn get_estimate(&self) -> f64
get estimated upload speed