pub struct Schedule {
pub rc: u32,
pub rm: u32,
pub ti: Duration,
}Expand description
The parameters of the retransmission schedule (RFC 8489 sections 6.2.1 and 6.2.2). The default is the RFC’s: Rc 7, Rm 16, Ti 39.5 s.
Fields§
§rc: u32Rc: how many times a request is sent over an unreliable transport. At least 1.
rm: u32Rm: the transaction fails Rm x RTO after the last request.
ti: DurationTi: how long a request waits over a reliable transport, where it is sent once.
Implementations§
Source§impl Schedule
impl Schedule
Sourcepub fn next_deadline(
&self,
reliable: bool,
start: Instant,
rto: Duration,
sent: u32,
now: Instant,
) -> Instant
pub fn next_deadline( &self, reliable: bool, start: Instant, rto: Duration, sent: u32, now: Instant, ) -> Instant
When a request that was just sent at now for the sent-th time (1 for the first) is
due again, or, after the last one, when its transaction fails. start is when the
transaction started and rto the RTO it started with; reliable says the transport
retransmits for the client.
Trait Implementations§
impl Copy for Schedule
impl Eq for Schedule
impl StructuralPartialEq for Schedule
Auto Trait Implementations§
impl Forget for Schedule
impl Freeze for Schedule
impl Move for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
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