Get basic incomplete Python queue API working

This commit is contained in:
Michael Bradley 2025-01-08 22:52:25 +13:00
parent 661e1d220a
commit 0995e6db90
Signed by: MichaelBradley
SSH key fingerprint: SHA256:cj/YZ5VT+QOKncqSkx+ibKTIn0Obg7OIzwzl9BL8EO8
8 changed files with 69 additions and 45 deletions

View file

@ -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