Struct pendulum::HashedWheel
[−]
[src]
pub struct HashedWheel<T> { /* fields omitted */ }
HashedWheel
representing a timer that stores timeouts for type T
.
Trait Implementations
impl<T> From<HashedWheelBuilder> for HashedWheel<T>
[src]
fn from(builder: HashedWheelBuilder) -> HashedWheel<T>
[src]
Performs the conversion.
impl<T> Pendulum<T> for HashedWheel<T>
[src]
fn insert_timeout(
&mut self,
timeout: Duration,
item: T
) -> PendulumResult<Token, T>
[src]
&mut self,
timeout: Duration,
item: T
) -> PendulumResult<Token, T>
Insert a timeout with the given duration and the given item into the Pendulum
.
fn remove_timeout(&mut self, token: Token) -> Option<T>
[src]
Removes the timeout corresponding with the given Token
, if one exists.
fn expired_timeout(&mut self) -> Option<T>
[src]
Retrieve the next expired timeout from the Pendulum
. Read more
fn tick(&mut self)
[src]
Tick the Pendulum
once.
fn tick_duration(&self) -> Duration
[src]
Configured tick duration for this Pendulum
.
fn max_capacity(&self) -> usize
[src]
Configured max timeout capacity for this Pendulum
.
fn max_timeout(&self) -> Duration
[src]
Configured maximum timeout for this Pendulum
.