Struct FilterAdjacencies

Source
pub struct FilterAdjacencies<A, P>(/* private fields */);

Trait Implementations§

Source§

impl<'a, A, P> Adjacencies<'a> for FilterAdjacencies<A, P>
where A: Adjacencies<'a>, P: 'a + Clone + for<'r> Fn(&'r (A::Edge, A::Node)) -> bool,

Source§

type Node = <A as Adjacencies<'a>>::Node

Source§

type Edge = <A as Adjacencies<'a>>::Edge

Source§

type IncidenceIt = Filtered<<A as Adjacencies<'a>>::IncidenceIt>

Source§

fn neigh_iter(&self, u: Self::Node) -> Self::IncidenceIt

Source§

fn neighs<'b>(&'b self, u: Self::Node) -> GraphIter<'b, Self, Self::IncidenceIt>
where Self: Sized, 'a: 'b,

Source§

fn filter<P>(self, predicate: P) -> FilterAdjacencies<Self, P>
where Self: Sized, P: for<'r> Fn(&'r (Self::Edge, Self::Node)) -> bool,

Source§

impl<A, P, I> GraphIterator<FilterAdjacencies<A, P>> for Filtered<I>
where I: GraphIterator<A>, P: for<'r> Fn(&'r I::Item) -> bool,

Source§

type Item = <I as GraphIterator<A>>::Item

Source§

fn next(&mut self, adj: &FilterAdjacencies<A, P>) -> Option<Self::Item>

Source§

fn size_hint(&self, _g: &G) -> (usize, Option<usize>)

Source§

fn count(self, g: &G) -> usize

Source§

fn iter(self, g: &G) -> GraphIter<'_, G, Self>
where G: Sized,

Auto Trait Implementations§

§

impl<A, P> Freeze for FilterAdjacencies<A, P>
where A: Freeze, P: Freeze,

§

impl<A, P> RefUnwindSafe for FilterAdjacencies<A, P>

§

impl<A, P> Send for FilterAdjacencies<A, P>
where A: Send, P: Send,

§

impl<A, P> Sync for FilterAdjacencies<A, P>
where A: Sync, P: Sync,

§

impl<A, P> Unpin for FilterAdjacencies<A, P>
where A: Unpin, P: Unpin,

§

impl<A, P> UnwindSafe for FilterAdjacencies<A, P>
where A: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.