pub trait Equal<Rhs = Self>where
    Rhs: ?Sized,{
    type Output;

    // Required methods
    fn is_equal(&self, other: &Rhs) -> Self::Output;
    fn is_not_equal(&self, other: &Rhs) -> Self::Output;
}
Expand description

Trait for equality comparisons.

Required Associated Types§

type Output

Required Methods§

fn is_equal(&self, other: &Rhs) -> Self::Output

Returns true if self and other are equal.

fn is_not_equal(&self, other: &Rhs) -> Self::Output

Returns true if self and other are not equal.

Trait Implementations§

source§

impl<E> Metrics<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

source§

fn count( case: &<Field<E> as Metrics<dyn Equal<Field<E>, Output = Boolean<E>>>>::Case ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
source§

impl<E, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where E: Environment, I: IntegerType,

§

type Case = (Mode, Mode)

source§

fn count( case: &<Integer<E, I> as Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>>>::Case ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
source§

impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

source§

fn output_mode( case: &<Field<E> as OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
source§

impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where E: Environment, I: IntegerType,

§

type Case = (Mode, Mode)

source§

fn output_mode( case: &<Integer<E, I> as OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.

Implementations on Foreign Types§

§

impl<E> Equal<Field<E>> for Field<E>where E: Environment,

§

fn is_equal(&self, other: &Field<E>) -> <Field<E> as Equal<Field<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Field<E> ) -> <Field<E> as Equal<Field<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

§

impl<E> Equal<Boolean<E>> for Boolean<E>where E: Environment,

§

fn is_equal( &self, other: &Boolean<E> ) -> <Boolean<E> as Equal<Boolean<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Boolean<E> ) -> <Boolean<E> as Equal<Boolean<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

§

impl<E> Equal<Group<E>> for Group<E>where E: Environment,

§

fn is_equal(&self, other: &Group<E>) -> <Group<E> as Equal<Group<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Group<E> ) -> <Group<E> as Equal<Group<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

§

impl<E> Equal<Scalar<E>> for Scalar<E>where E: Environment,

§

fn is_equal(&self, other: &Scalar<E>) -> <Scalar<E> as Equal<Scalar<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Scalar<E> ) -> <Scalar<E> as Equal<Scalar<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

§

impl<E, I> Equal<Integer<E, I>> for Integer<E, I>where E: Environment, I: IntegerType,

§

fn is_equal( &self, other: &Integer<E, I> ) -> <Integer<E, I> as Equal<Integer<E, I>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Integer<E, I> ) -> <Integer<E, I> as Equal<Integer<E, I>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

§

impl<E> Equal<Address<E>> for Address<E>where E: Environment,

§

fn is_equal( &self, other: &Address<E> ) -> <Address<E> as Equal<Address<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Address<E> ) -> <Address<E> as Equal<Address<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

source§

impl<E, I> Equal<Integer<E, I>> for Integer<E, I>where E: Environment, I: IntegerType,

source§

fn is_equal( &self, other: &Integer<E, I> ) -> <Integer<E, I> as Equal<Integer<E, I>>>::Output

Returns true if self and other are equal.

source§

fn is_not_equal( &self, other: &Integer<E, I> ) -> <Integer<E, I> as Equal<Integer<E, I>>>::Output

Returns true if self and other are not equal.

This method constructs a boolean that indicates if self and other are not equal to each other.

§

type Output = Boolean<E>

§

impl<E> Equal<StringType<E>> for StringType<E>where E: Environment,

§

fn is_equal( &self, other: &StringType<E> ) -> <StringType<E> as Equal<StringType<E>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &StringType<E> ) -> <StringType<E> as Equal<StringType<E>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<E>

Implementors§

source§

impl<E> Equal<Address<E>> for snarkvm_circuit_types::Address<E>where E: Environment,

§

type Output = Boolean<E>

source§

impl<E> Equal<Boolean<E>> for snarkvm_circuit_types::Boolean<E>where E: Environment,

§

type Output = Boolean<E>

source§

impl<E> Equal<Field<E>> for snarkvm_circuit_types::Field<E>where E: Environment,

§

type Output = Boolean<E>

source§

impl<E> Equal<Group<E>> for snarkvm_circuit_types::Group<E>where E: Environment,

§

type Output = Boolean<E>

source§

impl<E> Equal<Scalar<E>> for snarkvm_circuit_types::Scalar<E>where E: Environment,

§

type Output = Boolean<E>

source§

impl<E> Equal<StringType<E>> for snarkvm_circuit_types::StringType<E>where E: Environment,

§

type Output = Boolean<E>