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>
impl<T> From<HashedWheelBuilder> for HashedWheel<T>
Source§fn from(builder: HashedWheelBuilder) -> HashedWheel<T>
fn from(builder: HashedWheelBuilder) -> HashedWheel<T>
Converts to this type from the input type.
Source§impl<T> Pendulum<T> for HashedWheel<T>
impl<T> Pendulum<T> for HashedWheel<T>
Source§fn insert_timeout(
&mut self,
timeout: Duration,
item: T,
) -> PendulumResult<Token, T>
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>
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>
fn expired_timeout(&mut self) -> Option<T>
Retrieve the next expired timeout from the
Pendulum. Read moreSource§fn tick_duration(&self) -> Duration
fn tick_duration(&self) -> Duration
Configured tick duration for this
Pendulum.Source§fn max_capacity(&self) -> usize
fn max_capacity(&self) -> usize
Configured max timeout capacity for this
Pendulum.Source§fn max_timeout(&self) -> Duration
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> 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