pub struct Neighbors<'g, G>(pub &'g G);
Expand description
Neighbor access over all adjacent (undirected) edges.
Tuple Fields§
§0: &'g G
Trait Implementations§
Source§impl<'a, 'g: 'a, G> Adjacencies<'a> for Neighbors<'g, G>where
G: Undirected,
impl<'a, 'g: 'a, G> Adjacencies<'a> for Neighbors<'g, G>where
G: Undirected,
type Node = <G as GraphType>::Node<'a>
type Edge = <G as GraphType>::Edge<'a>
type IncidenceIt = AdjacenciesWrapIt<<G as Undirected>::NeighIt<'a>>
fn neigh_iter(&self, u: Self::Node) -> Self::IncidenceIt
fn neighs<'b>(&'b self, u: Self::Node) -> GraphIter<'b, Self, Self::IncidenceIt> ⓘwhere
Self: Sized,
'a: 'b,
fn filter<P>(self, predicate: P) -> FilterAdjacencies<Self, P>
Source§impl<'g, G, I> GraphIterator<Neighbors<'g, G>> for AdjacenciesWrapIt<I>where
I: GraphIterator<G>,
impl<'g, G, I> GraphIterator<Neighbors<'g, G>> for AdjacenciesWrapIt<I>where
I: GraphIterator<G>,
type Item = <I as GraphIterator<G>>::Item
fn next(&mut self, adj: &Neighbors<'g, G>) -> Option<Self::Item>
fn size_hint(&self, adj: &Neighbors<'g, G>) -> (usize, Option<usize>)
fn count(self, adj: &Neighbors<'g, G>) -> usize
fn iter(self, g: &G) -> GraphIter<'_, G, Self> ⓘwhere
G: Sized,
Auto Trait Implementations§
impl<'g, G> Freeze for Neighbors<'g, G>
impl<'g, G> RefUnwindSafe for Neighbors<'g, G>where
G: RefUnwindSafe,
impl<'g, G> Send for Neighbors<'g, G>where
G: Sync,
impl<'g, G> Sync for Neighbors<'g, G>where
G: Sync,
impl<'g, G> Unpin for Neighbors<'g, G>
impl<'g, G> UnwindSafe for Neighbors<'g, G>where
G: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more