Struct cargo::util::graph::Graph [−][src]
Implementations
impl Graph<PackageId, Rc<Vec<Dependency>>>
[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 link(&mut self, node: N, child: N) -> &mut E
[src]
pub fn contains<Q: ?Sized>(&self, k: &Q) -> bool where
N: Borrow<Q>,
Q: Ord + Eq,
[src]
N: Borrow<Q>,
Q: Ord + Eq,
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,
E: Unpin,
N: Unpin,
impl<N, E> !UnwindSafe for Graph<N, E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,