Crates.io | rbi |
lib.rs | rbi |
version | 0.1.1 |
source | src |
created_at | 2022-04-27 15:35:23.899927 |
updated_at | 2022-04-27 15:53:10.245789 |
description | A FIFO index queue that can be used for implementing a ring buffer. |
homepage | https://github.com/future-proof-iot/RIOT-rs |
repository | |
max_upload_size | |
id | 576093 |
size | 7,405 |
This library is part of RIOT-rs.
This module provides a FIFO index queue that can be used for implementing
a ring buffer. It works in no_std
settings.
It keeps track of indexes from 0..N (with N being a power of two).
put()
marks an index "used".
get()
returns an indexe that has been put()
(if any) and marks it unused.
peek()
returns the index that get()
would return next (if any) without
marking it unused.
All operations are O(1).