Struct s3_algo::timeout::TimeoutState
source · pub struct TimeoutState { /* private fields */ }Expand description
State for timeouts, especially tailored toward uploading files. But can be useful in any case where the size of an operation in bytes is known.
Implementations§
source§impl TimeoutState
impl TimeoutState
pub fn new(cfg: AlgorithmConfig, specific: SpecificTimings) -> TimeoutState
Trait Implementations§
source§impl Timeout for TimeoutState
impl Timeout for TimeoutState
source§fn get_estimate(&self) -> f64
fn get_estimate(&self) -> f64
Not used by algorithm
source§fn 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.
source§fn update(&mut self, result: &RequestReport)
fn update(&mut self, result: &RequestReport)
Update the internal estimate of the extra timeout per unit of size