pqueue 0.1.0

Priority Queue for Rust
Documentation
  • Coverage
  • 0%
    0 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 5.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 288.81 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • tidwall/pqueue
    15 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tidwall

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