orx_v

Enum Equality

Source
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

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 and card2 are the unequal cardinalities at the given idx 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§

Source§

impl<D: Clone + Dim> Clone for Equality<D>
where D::CardIdx: Clone, D::Idx: Clone,

Source§

fn clone(&self) -> Equality<D>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Dim> Debug for Equality<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: Dim> Display for Equality<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: PartialEq + Dim> PartialEq for Equality<D>
where D::CardIdx: PartialEq, D::Idx: PartialEq,

Source§

fn eq(&self, other: &Equality<D>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<D: Copy + Dim> Copy for Equality<D>
where D::CardIdx: Copy, D::Idx: Copy,

Source§

impl<D: Eq + Dim> Eq for Equality<D>
where D::CardIdx: Eq, D::Idx: Eq,

Source§

impl<D: Dim> StructuralPartialEq for Equality<D>

Auto Trait Implementations§

§

impl<D> Freeze for Equality<D>
where <D as Dim>::CardIdx: Freeze, <D as Dim>::Idx: Freeze,

§

impl<D> RefUnwindSafe for Equality<D>
where <D as Dim>::CardIdx: RefUnwindSafe, <D as Dim>::Idx: RefUnwindSafe,

§

impl<D> Send for Equality<D>
where <D as Dim>::CardIdx: Send, <D as Dim>::Idx: Send,

§

impl<D> Sync for Equality<D>
where <D as Dim>::CardIdx: Sync, <D as Dim>::Idx: Sync,

§

impl<D> Unpin for Equality<D>
where <D as Dim>::CardIdx: Unpin, <D as Dim>::Idx: Unpin,

§

impl<D> UnwindSafe for Equality<D>
where <D as Dim>::CardIdx: UnwindSafe, <D as Dim>::Idx: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.