pub enum Equality<D: Dim> {
Equal,
UnequalCard(D::CardIdx, usize, usize),
UnequalValue(D::Idx),
}
Expand description
Result of an equality
check of two vectors of the same dimension.
The result can be
Equality::Equal
iff the cardinality of the structures as well as all values at corresponding positions are equal.Equality::UnequalCard
if cardinalities do not agree at at least one level.Equality::UnequalValue
if any of the values are different.
Variants§
Equal
Cardinality of the structures as well as all values at corresponding positions are equal.
UnequalCard(D::CardIdx, usize, usize)
Cardinalities do not agree at at least one level.
The tuple (idx, card1, card2)
represents the following:
idx
is the place the inequality in cardinalities are observed;card1
andcard2
are the unequal cardinalities at the givenidx
in the first and second vectors, respectively.
UnequalValue(D::Idx)
Values of at least one of the element is different.
The (idx)
represents the index where the value inequality is observed.
Trait Implementations§
impl<D: Copy + Dim> Copy for Equality<D>
impl<D: Eq + Dim> Eq for Equality<D>
impl<D: Dim> StructuralPartialEq for Equality<D>
Auto Trait Implementations§
impl<D> Freeze for Equality<D>
impl<D> RefUnwindSafe for Equality<D>
impl<D> Send for Equality<D>
impl<D> Sync for Equality<D>
impl<D> Unpin for Equality<D>
impl<D> UnwindSafe for Equality<D>
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