Struct cargo::util::DependencyQueue
[−]
[src]
pub struct DependencyQueue<K: Eq + Hash, V> { /* fields omitted */ }
Methods
impl<K: Hash + Eq + Clone, V> DependencyQueue<K, V>
[src]
fn new() -> DependencyQueue<K, V>
Creates a new dependency queue with 0 packages.
fn queue(&mut self,
fresh: Freshness,
key: K,
value: V,
dependencies: &[K])
-> &mut V
fresh: Freshness,
key: K,
value: V,
dependencies: &[K])
-> &mut V
Adds a new package to this dependency queue.
It is assumed that any dependencies of this package will eventually also be added to the dependency queue.
fn dequeue(&mut self) -> Option<(Freshness, K, V)>
Dequeues a package that is ready to be built.
A package is ready to be built when it has 0 un-built dependencies. If
None
is returned then no packages are ready to be built.
fn is_empty(&self) -> bool
Returns whether there are remaining packages to be built.
fn len(&self) -> usize
Returns the number of remaining packages to be built.
fn finish(&mut self, key: &K, fresh: Freshness)
Indicate that a package has been built.
This function will update the dependency queue with this information,
possibly allowing the next invocation of dequeue
to return a package.