pub struct Data { /* private fields */ }Expand description
Connection (or socket, if you will) extra data.
The state object only carries the state itself. Further data is in this object.
Implementations§
Source§impl Data
impl Data
Sourcepub fn srt_default(&mut self, v: Duration)
pub fn srt_default(&mut self, v: Duration)
Set default T1 timer / smoothed roundtrip.
Sourcepub fn enable_experiment(&mut self, ex: Experiment)
pub fn enable_experiment(&mut self, ex: Experiment)
Enable an experiment.
Sourcepub fn t1_expired(&self) -> bool
pub fn t1_expired(&self) -> bool
Return true if T1 (retry) has expired.
Sourcepub fn t3_expired(&self) -> bool
pub fn t3_expired(&self) -> bool
Return true if T3 (idle timer) has expired.
Sourcepub fn active_timers(&self) -> Vec<Event>
pub fn active_timers(&self) -> Vec<Event>
Return list of expired timers.
Sourcepub fn next_timer_remaining(&self) -> Option<Duration>
pub fn next_timer_remaining(&self) -> Option<Duration>
Return time until next timer expires, or None if no timer is currently running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnsafeUnpin for Data
impl UnwindSafe for Data
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