[][src]Struct cargo::util::DependencyQueue

pub struct DependencyQueue<K: Eq + Hash, V> { /* fields omitted */ }

Methods

impl<K: Hash + Eq + Clone, V> DependencyQueue<K, V>[src]

pub fn new() -> DependencyQueue<K, V>[src]

Creates a new dependency queue with 0 packages.

pub fn queue(
    &mut self,
    fresh: Freshness,
    key: &K,
    value: V,
    dependencies: &[K]
) -> &mut V
[src]

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.

pub fn queue_finished(&mut self)[src]

All nodes have been added, calculate some internal metadata and prepare for dequeue.

pub fn dequeue(&mut self) -> Option<(Freshness, K, V)>[src]

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.

pub fn is_empty(&self) -> bool[src]

Returns whether there are remaining packages to be built.

pub fn len(&self) -> usize[src]

Returns the number of remaining packages to be built.

pub fn finish(&mut self, key: &K, fresh: Freshness)[src]

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.

Trait Implementations

impl<K: Hash + Eq + Clone, V> Default for DependencyQueue<K, V>[src]

impl<K: Debug + Eq + Hash, V: Debug> Debug for DependencyQueue<K, V>[src]

Auto Trait Implementations

impl<K, V> Send for DependencyQueue<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for DependencyQueue<K, V> where
    K: Sync,
    V: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self