diff options
| author | Christian Cunningham <c@localhost> | 2022-08-23 22:18:04 -0700 |
|---|---|---|
| committer | Christian Cunningham <c@localhost> | 2022-08-23 22:18:04 -0700 |
| commit | e746ab10da35e5d9ef957c72adf9a3ec7a7df225 (patch) | |
| tree | daf55ae2215e7934292f21de68727ba733c7b3af /src/util/queue.rs | |
| parent | ec68c0209227dd371b8f1c86890575eac0277695 (diff) | |
Queue trait
Diffstat (limited to 'src/util/queue.rs')
| -rw-r--r-- | src/util/queue.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/queue.rs b/src/util/queue.rs new file mode 100644 index 0000000..b9e6edc --- /dev/null +++ b/src/util/queue.rs @@ -0,0 +1,8 @@ +use super::node::Node; +pub trait Queue<'a> { + type Data; + + fn init(&self); + fn pop(&self) -> Option<&mut Node<'a,Self::Data>>; + fn push(&self, freed_item: &mut Node<'a,Self::Data>); +} |
