[−][src]Struct cargo::util::DependencyQueue
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]
&mut self,
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.
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 true
if 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]
fn default() -> 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,
K: Send,
V: Send,
impl<K, V> Sync for DependencyQueue<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self