pub struct PathEq<V, E> {
pub lhs: Path<V, E>,
pub rhs: Path<V, E>,
}Expand description
Assertion of an equation between the composites of two paths in a category.
Fields§
§lhs: Path<V, E>Left hand side of equation.
rhs: Path<V, E>Right hand side of equation.
Implementations§
Source§impl<V, E> PathEq<V, E>
impl<V, E> PathEq<V, E>
Sourcepub fn src(&self, graph: &impl Graph<V = V, E = E>) -> V
pub fn src(&self, graph: &impl Graph<V = V, E = E>) -> V
Source of the path equation in the given graph.
Panics if the two sides of the path equation have different sources.
Sourcepub fn tgt(&self, graph: &impl Graph<V = V, E = E>) -> V
pub fn tgt(&self, graph: &impl Graph<V = V, E = E>) -> V
Target of the path equation in the given graph.
Panics if the two sides of the path equation have different targets.
Sourcepub fn validate_in<G>(&self, graph: &G) -> Result<(), NonEmpty<InvalidPathEq>>
pub fn validate_in<G>(&self, graph: &G) -> Result<(), NonEmpty<InvalidPathEq>>
Validates that the path equation is well defined in the given graph.
Sourcepub fn iter_invalid_in<G>(
&self,
graph: &G,
) -> impl Iterator<Item = InvalidPathEq> + use<G, V, E>
pub fn iter_invalid_in<G>( &self, graph: &G, ) -> impl Iterator<Item = InvalidPathEq> + use<G, V, E>
Iterators over failures of the path equation to be well defined.
Trait Implementations§
impl<V: Eq, E: Eq> Eq for PathEq<V, E>
impl<V, E> StructuralPartialEq for PathEq<V, E>
Auto Trait Implementations§
impl<V, E> Freeze for PathEq<V, E>
impl<V, E> RefUnwindSafe for PathEq<V, E>where
V: RefUnwindSafe,
E: RefUnwindSafe,
impl<V, E> Send for PathEq<V, E>
impl<V, E> Sync for PathEq<V, E>
impl<V, E> Unpin for PathEq<V, E>
impl<V, E> UnwindSafe for PathEq<V, E>where
V: UnwindSafe,
E: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.