[][src]Struct cargo::util::graph::Graph

pub struct Graph<N: Clone, E: Clone> { /* fields omitted */ }

Implementations

impl Graph<PackageId, HashSet<Dependency>>[src]

pub fn parents_of(
    &self,
    p: PackageId
) -> impl Iterator<Item = (PackageId, bool)> + '_
[src]

impl<N: Eq + Ord + Clone, E: Default + Clone> Graph<N, E>[src]

pub fn new() -> Graph<N, E>[src]

pub fn add(&mut self, node: N)[src]

pub fn contains<Q: ?Sized>(&self, k: &Q) -> bool where
    N: Borrow<Q>,
    Q: Ord + Eq
[src]

pub fn edge(&self, from: &N, to: &N) -> Option<&E>[src]

pub fn edges(&self, from: &N) -> impl Iterator<Item = (&N, &E)>[src]

pub fn sort(&self) -> Vec<N>[src]

A topological sort of the Graph

pub fn iter(&self) -> impl Iterator<Item = &N>[src]

pub fn is_path_from_to<'a>(&'a self, from: &'a N, to: &'a N) -> bool[src]

Checks if there is a path from from to to.

pub fn path_to_bottom<'a>(&'a self, pkg: &'a N) -> Vec<&'a N>[src]

Resolves one of the paths from the given dependent package down to a leaf.

pub fn path_to_top<'a>(&'a self, pkg: &'a N) -> Vec<&'a N>[src]

Resolves one of the paths from the given dependent package up to the root.

Trait Implementations

impl<N: Eq + Ord + Clone, E: Clone> Clone for Graph<N, E>[src]

impl<N: Display + Eq + Ord + Clone, E: Clone> Debug for Graph<N, E>[src]

impl<N: Eq + Ord + Clone, E: Default + Clone> Default for Graph<N, E>[src]

impl<N: Eq + Ord + Clone, E: Eq + Clone> Eq for Graph<N, E>[src]

impl<N: Eq + Ord + Clone, E: Eq + Clone> PartialEq<Graph<N, E>> for Graph<N, E>[src]

Auto Trait Implementations

impl<N, E> !RefUnwindSafe for Graph<N, E>

impl<N, E> !Send for Graph<N, E>

impl<N, E> !Sync for Graph<N, E>

impl<N, E> Unpin for Graph<N, E> where
    E: Unpin,
    N: Unpin

impl<N, E> !UnwindSafe for Graph<N, E>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,