pub struct RtoEstimator { /* private fields */ }Expand description
The retransmission timeout of RFC 6298, as RFC 8489 section 6.2.1 uses it: kept per server, to 1 ms, never below the configured initial value, and forgotten after ten minutes without a transaction.
Implementations§
Source§impl RtoEstimator
impl RtoEstimator
Sourcepub fn new(initial: Duration, enabled: bool) -> Self
pub fn new(initial: Duration, enabled: bool) -> Self
An estimator that starts at initial. With enabled false every transaction starts
at initial whatever the round-trip times are.
Sourcepub fn is_stale(&self, now: Instant) -> bool
pub fn is_stale(&self, now: Instant) -> bool
Whether nothing was sent to or heard from the server for ten minutes at now, so that
the estimate is no longer used (and the estimator can be dropped).
Trait Implementations§
Source§impl Clone for RtoEstimator
impl Clone for RtoEstimator
impl Copy for RtoEstimator
Auto Trait Implementations§
impl Forget for RtoEstimator
impl Freeze for RtoEstimator
impl Move for RtoEstimator
impl RefUnwindSafe for RtoEstimator
impl Send for RtoEstimator
impl Sync for RtoEstimator
impl Unpin for RtoEstimator
impl UnsafeUnpin for RtoEstimator
impl UnwindSafe for RtoEstimator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more