Struct HashedWheel

Source
pub struct HashedWheel<T> { /* private fields */ }
Expand description

HashedWheel representing a timer that stores timeouts for type T.

Trait Implementations§

Source§

impl<T> From<HashedWheelBuilder> for HashedWheel<T>

Source§

fn from(builder: HashedWheelBuilder) -> HashedWheel<T>

Converts to this type from the input type.
Source§

impl<T> Pendulum<T> for HashedWheel<T>

Source§

fn insert_timeout( &mut self, timeout: Duration, item: T, ) -> PendulumResult<Token, T>

Insert a timeout with the given duration and the given item into the Pendulum.
Source§

fn remove_timeout(&mut self, token: Token) -> Option<T>

Removes the timeout corresponding with the given Token, if one exists.
Source§

fn expired_timeout(&mut self) -> Option<T>

Retrieve the next expired timeout from the Pendulum. Read more
Source§

fn tick(&mut self)

Tick the Pendulum once.
Source§

fn tick_duration(&self) -> Duration

Configured tick duration for this Pendulum.
Source§

fn max_capacity(&self) -> usize

Configured max timeout capacity for this Pendulum.
Source§

fn max_timeout(&self) -> Duration

Configured maximum timeout for this Pendulum.

Auto Trait Implementations§

§

impl<T> Freeze for HashedWheel<T>

§

impl<T> RefUnwindSafe for HashedWheel<T>
where T: RefUnwindSafe,

§

impl<T> Send for HashedWheel<T>
where T: Send,

§

impl<T> Sync for HashedWheel<T>
where T: Sync,

§

impl<T> Unpin for HashedWheel<T>
where T: Unpin,

§

impl<T> UnwindSafe for HashedWheel<T>
where T: UnwindSafe,

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.