Expand description
A trait and implementations of non-blocking, infallible FIFO queues that support bulk enqueueing and bulk dequeueing via APIs inspired by ufotofu.
§Queue Implementations
So far, there are two implementations:
Fixed
, which is a heap-allocated ring-buffer of unchanging capacity. It is gated behind thestd
oralloc
feature, the prior of which is enabled by default.Static
, which works exactly likeFixed
, but is backed by an array of static capacity. It requires no allocations.
Future plans include an elastic queue that grows and shrinks its capacity within certain parameters, to free up memory under low load.
§Features
The std
and alloc
features control functionality that relies on the standard library or dynamic memory allocation respectively.
The nightly
features enables allocator-aware APIs and some optimisations that rely on nightly APIs.
Structs§
- Fixed
- A queue holding up to a certain number of items. The capacity is set upon creation and remains fixed. Performs a single heap allocation on creation.
- Static
- A queue holding up to a certain number of items. The capacity is statically determined by a const parameter. Performs no allocations.
Traits§
- Queue
- A first-in-first-out queue. Provides methods for bulk transfer of items similar to ufotofu
BulkProducer
s andBulkConsumer
s.