13 lines
504 B
Rust
13 lines
504 B
Rust
/// Data structures for the "pure" min-queues, supporting duplicates but no arbitrary updates
|
|
mod binary_heap;
|
|
pub use binary_heap::BinaryHeap;
|
|
|
|
/// A data structure usable for backing a "pure" queue
|
|
pub trait PureBacking<T: PartialOrd + Send + Sync>: Send + Sync {
|
|
/// Places an item into the queue
|
|
fn add(&mut self, item: T);
|
|
/// Removes the item with minimum priority, if it exists
|
|
fn pop(&mut self) -> Option<T>;
|
|
/// The number of items in the queue
|
|
fn len(&self) -> usize;
|
|
}
|