fixed-queue 0.3.6

no_std, no_alloc, use [T; N]. support `Vec`/`VecDeque`/`spsc`/`History`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use fixed_queue::History;
static HISTORY: History<u8, 3> = History::new();

fn main() {
    assert!(HISTORY.insert(1));
    assert!(!HISTORY.insert(1));
    assert!(HISTORY.insert(2));
    assert!(HISTORY.insert(3));
    assert!(!HISTORY.insert(2));
    assert!(HISTORY.contains(&1));
    assert!(HISTORY.insert(4));
    assert!(!HISTORY.contains(&1));
    assert!(HISTORY.insert(5));
}