[−][src]Struct cargo::util::graph::Graph
Methods
impl<N: Eq + Hash + Clone, E: Default> 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: Hash + Eq,
[src]
N: Borrow<Q>,
Q: Hash + 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 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 + Hash, E: Eq> PartialEq<Graph<N, E>> for Graph<N, E>
[src]
fn eq(&self, other: &Graph<N, E>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl<N: Eq + Hash + Clone, E: Default> Default for Graph<N, E>
[src]
impl<N: Eq + Hash + Clone, E: Clone> Clone for Graph<N, E>
[src]
fn clone(&self) -> Graph<N, E>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<N: Eq + Hash, E: Eq> Eq for Graph<N, E>
[src]
impl<N: Display + Eq + Hash, E> Debug for Graph<N, E>
[src]
Auto Trait Implementations
impl<N, E> Send for Graph<N, E> where
E: Send,
N: Send,
E: Send,
N: Send,
impl<N, E> Sync for Graph<N, E> where
E: Sync,
N: Sync,
E: Sync,
N: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
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> 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self