1 unstable release

0.1.0 May 5, 2022

#1763 in Data structures

Download history 656/week @ 2024-01-10 865/week @ 2024-01-17 889/week @ 2024-01-24 808/week @ 2024-01-31 951/week @ 2024-02-07 859/week @ 2024-02-14 1115/week @ 2024-02-21 1511/week @ 2024-02-28 1424/week @ 2024-03-06 1368/week @ 2024-03-13 1348/week @ 2024-03-20 1141/week @ 2024-03-27 1191/week @ 2024-04-03 1443/week @ 2024-04-10 1571/week @ 2024-04-17 980/week @ 2024-04-24

5,375 downloads per month
Used in 8 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