Trait Timeout

Source
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§

Source

fn get_timeout(&self, size: usize, retries: usize) -> Duration

Size is in either bytes or objects, depending on the type of requests.

Source

fn update(&mut self, _: &RequestReport)

Update the internal estimate of the extra timeout per unit of size

Source

fn get_estimate(&self) -> f64

get estimated upload speed

Implementors§