Skip to main content

Data

Struct Data 

Source
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

Source

pub fn new(me: Addr) -> Self

Create new Data with the specified address being the local one.

Source

pub fn srt_default(&mut self, v: Duration)

Set default T1 timer / smoothed roundtrip.

Source

pub fn t3v(&mut self, v: Duration)

Set T3 / idle timer.

Source

pub fn enable_experiment(&mut self, ex: Experiment)

Enable an experiment.

Source

pub fn mtu(&mut self, v: usize)

Set MTU.

Source

pub fn ext(&self) -> bool

Return true if using 128 modulus.

Source

pub fn t1_expired(&self) -> bool

Return true if T1 (retry) has expired.

Source

pub fn t3_expired(&self) -> bool

Return true if T3 (idle timer) has expired.

Source

pub fn active_timers(&self) -> Vec<Event>

Return list of expired timers.

Source

pub fn next_timer_remaining(&self) -> Option<Duration>

Return time until next timer expires, or None if no timer is currently running.

Trait Implementations§

Source§

impl Debug for Data

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.