pub struct Graph<N, E> { /* private fields */ }
Implementations
sourceimpl<N: Eq + Hash + Clone, E: Default> Graph<N, E>
impl<N: Eq + Hash + Clone, E: Default> Graph<N, E>
pub fn new() -> Graph<N, E>
pub fn add(&mut self, node: N)
pub fn link(&mut self, node: N, child: N) -> &mut E
pub fn contains<Q: ?Sized>(&self, k: &Q) -> boolwhere
N: Borrow<Q>,
Q: Hash + Eq,
pub fn edge(&self, from: &N, to: &N) -> Option<&E>
pub fn edges(&self, from: &N) -> impl Iterator<Item = (&N, &E)>
pub fn iter(&self) -> impl Iterator<Item = &N>
Trait Implementations
sourceimpl<N: Eq + Hash, E: Eq> PartialEq<Graph<N, E>> for Graph<N, E>
impl<N: Eq + Hash, E: Eq> PartialEq<Graph<N, E>> for Graph<N, E>
impl<N: Eq + Hash, E: Eq> Eq for Graph<N, E>
Auto Trait Implementations
impl<N, E> RefUnwindSafe for Graph<N, E>where
E: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, E> Send for Graph<N, E>where
E: Send,
N: Send,
impl<N, E> Sync for Graph<N, E>where
E: Sync,
N: Sync,
impl<N, E> Unpin for Graph<N, E>where
E: Unpin,
N: Unpin,
impl<N, E> UnwindSafe for Graph<N, E>where
E: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more