Get basic incomplete Python queue API working
This commit is contained in:
parent
661e1d220a
commit
0995e6db90
8 changed files with 69 additions and 45 deletions
|
@ -2,9 +2,7 @@
|
|||
pub mod binary_heap;
|
||||
|
||||
/// A data structure usable for backing a "pure" queue
|
||||
pub trait PureBacking<T: Ord>: FromIterator<T> {
|
||||
/// Instantiates a new data structure
|
||||
fn new() -> Self;
|
||||
pub trait PureBacking<T: Ord + 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue