Expand description
A base implementation of the sorted timer timeout queue.
Modules§
- timer_
consumer - A
consumertype of the timer which consumes the intance and returns it when timer triggers. Theconsumedinstance normally whould be Send because it will be moved into the timer which may be processed in other thread. - timer_
tickets - A
ticketissuer. Issues a ticket which should be assigned to the instance whcih was added to the timer’s queue. Theticketcan be used to remove the item from queue before the timeout event. If ticket is dropped i.e connection closed, the ticket will be in timer’s queue until timeout where it will be ignored on timeout event.
Structs§
- Deque
Once - This queue mode removes all entries from the queue that have timed out.
- Deque
Periodic - This queue mode does not remove an element that has timed out (by
absolute_timeout), but extends (byrelative_period) the timeout and returns the element back to the queue. - Order
Timer Deque - A VecDeque based queue which is sorted (in ascending order) by the timeout
which is
absolutetime.
Traits§
- AsFd
- A trait to borrow the file descriptor from an underlying object.
- AsRawFd
- A trait to extract the raw file descriptor from an underlying object.
- Ordered
Timer Deque Handle - A standart interface for each deque type. Every deque type must implement this trait.
- Ordered
Timer Deque Interf - A trait which is used by the base OrderTimerDeque. This is an interface which provides access to the timeout value of the instance.
- Ordered
Timer Deque Mode - A trait which is implemented by the structs which define the operation mode of the deque.
- Timer
Timeout Collection - A trait for the generalization of the collection type which is used to collect the timeout values i.e ticket IDs.