A heapless version of the Rust Vec
, VecDeque
.
nostd, noalloc, use [T; N].
support Vec
/VecDeque
/spsc
/History
.
```rust use fixed_queue::Vec;
let mut vec: Vec
```rust use fixed_queue::VecDeque;
let mut vec: VecDeque
```rust
use fixed_queue::Spsc;
static SPSC: Spsc
let sender = SPSC.takesender().unwrap(); let recver = SPSC.takerecver().unwrap();
asserteq!(SPSC.capacity(), 3); assert!(sender.send(1).isok()); assert!(sender.send(2).isok()); assert!(sender.send(3).isok()); assert!(sender.send(4).is_err()); ```
```rust
use fixed_queue::History;
static HISTORY: History
assert!(HISTORY.insert(1)); assert!(HISTORY.contains(&1)); ```