Expand description
Yet Another Ring Buffer.
SPSC channel backed by a ring buffer.
Features include:
- Lock free, non-blocking push and pop.
- If desired, can integrate blocking, futures-based, or custom waiting. If undesired, no-op waiters add no overhead.
veiwfunctions for safely accessing the buffer directly, ex. for doing IO directly from or to the buffer.no_stdcompatible (currently requiresalloc)
Modules§
- waiter
- Waiting strategies: abstraction over blocking and futures.
Structs§
- Closed
Error - Error produced when trying to do an operation but the other side is closed.
- Read
View - Ring buffer available contents, as two slices.
- Ring
Buffer Consumer - Consumer side of the ring buffer.
- Ring
Buffer Producer - Producer side of the ring buffer.
- Uninit
Write View - View into the writable portion of the buffer, with uninitialized elements.
- Write
View - View into the writable portion of the buffer.
Enums§
- Push
Error - Error produced while trying to push a single value to the buffer.
Functions§
- new_
blocking - Creates a new ring buffer with the specified capacity and blocking waiters.
- new_
waitless - Creates a new ring buffer with the specified capacity and no waiters.
- with_
default_ waiters - Creates a new ring buffer with the specified capacity and
Default::default()for waiters. - with_
waiters - Creates a new ring buffer with the specified capacity and specified waiters.