1 unstable release

0.1.0 May 5, 2022

#40 in #priority-queue

Download history 1222/week @ 2024-07-29 1073/week @ 2024-08-05 904/week @ 2024-08-12 1388/week @ 2024-08-19 1507/week @ 2024-08-26 1337/week @ 2024-09-02 2333/week @ 2024-09-09 1665/week @ 2024-09-16 1781/week @ 2024-09-23 1552/week @ 2024-09-30 2473/week @ 2024-10-07 3458/week @ 2024-10-14 3632/week @ 2024-10-21 2870/week @ 2024-10-28 2203/week @ 2024-11-04 2541/week @ 2024-11-11

11,361 downloads per month
Used in 9 crates (via rtree_rs)

MIT license

5KB
87 lines

pqueue

license crates.io version documentation

A fast little priority queue for Rust.

Allows for items that have the PartialOrd trait.

Example

Here we create a queue of simple integers.

let items = [9, 5, 1, 3, 4, 2, 6, 8, 9, 2, 1];
let mut q = pqueue::Queue::new();

for item in items {
    q.push(item);
}

while let Some(item) = q.pop() {
    println!("{}", item);
}

// OUTPUT:
// 1
// 1
// 2
// 2
// 3
// 4
// 5
// 6
// 8
// 9
// 9

No runtime deps