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§

§

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

§

type Case = (Mode, Mode)

§

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

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)

§

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

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

§

type Case = (Mode, Mode)

§

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

Returns the mode of the output.
§

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)

§

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

§

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

§

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.

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

§

type Output = Boolean<E>

§

impl<N, Private> Equal<Record<N, Private>> for Record<N, Private>where N: Network, Private: Visibility<Boolean = Boolean<N>>,

§

fn is_equal( &self, other: &Record<N, Private> ) -> <Record<N, Private> as Equal<Record<N, Private>>>::Output

Returns true if self and other are equal.

Note: This method does not check the nonce equality.

§

fn is_not_equal( &self, other: &Record<N, Private> ) -> <Record<N, Private> as Equal<Record<N, Private>>>::Output

Returns true if self and other are not equal.

Note: This method does not check the nonce equality.

§

type Output = Boolean<N>

§

impl<N, Private> Equal<Owner<N, Private>> for Owner<N, Private>where N: Network, Private: Visibility<Boolean = Boolean<N>>,

§

fn is_equal( &self, other: &Owner<N, Private> ) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Owner<N, Private> ) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N> Equal<Plaintext<N>> for Plaintext<N>where N: Network,

§

fn is_equal( &self, other: &Plaintext<N> ) -> <Plaintext<N> as Equal<Plaintext<N>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Plaintext<N> ) -> <Plaintext<N> as Equal<Plaintext<N>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N, Private> Equal<Entry<N, Private>> for Entry<N, Private>where N: Network, Private: Visibility<Boolean = Boolean<N>>,

§

fn is_equal( &self, other: &Entry<N, Private> ) -> <Entry<N, Private> as Equal<Entry<N, Private>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Entry<N, Private> ) -> <Entry<N, Private> as Equal<Entry<N, Private>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N> Equal<Identifier<N>> for Identifier<N>where N: Network,

§

fn is_equal( &self, other: &Identifier<N> ) -> <Identifier<N> as Equal<Identifier<N>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Identifier<N> ) -> <Identifier<N> as Equal<Identifier<N>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N> Equal<Value<N>> for Value<N>where N: Network,

§

fn is_equal(&self, other: &Value<N>) -> <Value<N> as Equal<Value<N>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Value<N> ) -> <Value<N> as Equal<Value<N>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N> Equal<Literal<N>> for Literal<N>where N: Network,

§

fn is_equal( &self, other: &Literal<N> ) -> <Literal<N> as Equal<Literal<N>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Literal<N> ) -> <Literal<N> as Equal<Literal<N>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

§

impl<N> Equal<Ciphertext<N>> for Ciphertext<N>where N: Network,

§

fn is_equal( &self, other: &Ciphertext<N> ) -> <Ciphertext<N> as Equal<Ciphertext<N>>>::Output

Returns true if self and other are equal.

§

fn is_not_equal( &self, other: &Ciphertext<N> ) -> <Ciphertext<N> as Equal<Ciphertext<N>>>::Output

Returns true if self and other are not equal.

§

type Output = Boolean<N>

Implementors§

source§

impl<A> Equal<Literal<A>> for snarkvm_circuit::Literal<A>where A: Aleo,

§

type Output = Boolean<A>

source§

impl<A> Equal<Plaintext<A>> for snarkvm_circuit::Plaintext<A>where A: Aleo,

§

type Output = Boolean<A>

source§

impl<A> Equal<Value<A>> for snarkvm_circuit::Value<A>where A: Aleo,

§

type Output = Boolean<A>

source§

impl<A> Equal<Ciphertext<A>> for snarkvm_circuit::Ciphertext<A>where A: Aleo,

§

type Output = Boolean<A>

source§

impl<A> Equal<Identifier<A>> for snarkvm_circuit::Identifier<A>where A: Aleo,

§

type Output = Boolean<A>

source§

impl<A, Private> Equal<Entry<A, Private>> for snarkvm_circuit::Entry<A, Private>where A: Aleo, Private: Visibility<A>,

§

type Output = Boolean<A>

source§

impl<A, Private> Equal<Owner<A, Private>> for snarkvm_circuit::Owner<A, Private>where A: Aleo, Private: Visibility<A>,

§

type Output = Boolean<A>

source§

impl<A, Private> Equal<Record<A, Private>> for snarkvm_circuit::Record<A, Private>where A: Aleo, Private: Visibility<A>,

§

type Output = Boolean<A>

§

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

§

type Output = Boolean<E>

§

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

§

type Output = Boolean<E>

§

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

§

type Output = Boolean<E>

§

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

§

type Output = Boolean<E>

§

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

§

type Output = Boolean<E>

§

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

§

type Output = Boolean<E>