Module deque_timeout

Module deque_timeout 

Source
Expand description

A base implementation of the sorted timer timeout queue.

Modules§

deque_timeout_os
timer_consumer
A consumer type of the timer which consumes the intance and returns it when timer triggers. The consumed instance normally whould be Send because it will be moved into the timer which may be processed in other thread.
timer_tickets
A ticket issuer. Issues a ticket which should be assigned to the instance whcih was added to the timer’s queue. The ticket can 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§

BorrowedFd
A borrowed file descriptor.
DequeOnce
This queue mode removes all entries from the queue that have timed out.
DequePeriodic
This queue mode does not remove an element that has timed out (by absolute_timeout), but extends (by relative_period) the timeout and returns the element back to the queue.
OrderTimerDeque
A VecDeque based queue which is sorted (in ascending order) by the timeout which is absolute time.

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.
OrderedTimerDequeHandle
A standart interface for each deque type. Every deque type must implement this trait.
OrderedTimerDequeInterf
A trait which is used by the base OrderTimerDeque. This is an interface which provides access to the timeout value of the instance.
OrderedTimerDequeMode
A trait which is implemented by the structs which define the operation mode of the deque.
TimerTimeoutCollection
A trait for the generalization of the collection type which is used to collect the timeout values i.e ticket IDs.

Type Aliases§

RawFd
Raw file descriptors.