Equal

Trait Equal 

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

Required Methods§

Source

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

Returns true if self and other are equal.

Source

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

Returns true if self and other are not equal.

Implementations on Foreign Types§

Source§

impl<A> Equal for Argument<A>
where A: Aleo,

Source§

fn is_equal(&self, other: &Argument<A>) -> <Argument<A> as Equal>::Output

Returns true if self and other are equal.

Source§

fn is_not_equal(&self, other: &Argument<A>) -> <Argument<A> as Equal>::Output

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

impl<A> Equal for ComputeKey<A>
where A: Aleo,

Source§

fn is_equal(&self, other: &ComputeKey<A>) -> <ComputeKey<A> as Equal>::Output

Returns true if self and other are equal.

Source§

fn is_not_equal( &self, other: &ComputeKey<A>, ) -> <ComputeKey<A> as Equal>::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.

Source§

type Output = Boolean<A>

Source§

impl<A> Equal for Signature<A>
where A: Aleo,

Source§

fn is_equal(&self, other: &Signature<A>) -> <Signature<A> as Equal>::Output

Returns true if self and other are equal.

Source§

fn is_not_equal(&self, other: &Signature<A>) -> <Signature<A> as Equal>::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.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

impl<A> Equal for Future<A>
where A: Aleo,

Source§

fn is_equal(&self, other: &Future<A>) -> <Future<A> as Equal>::Output

Returns true if self and other are equal.

Source§

fn is_not_equal(&self, other: &Future<A>) -> <Future<A> as Equal>::Output

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

impl<A> Equal for ProgramID<A>
where A: Aleo,

Source§

fn is_equal(&self, other: &ProgramID<A>) -> <ProgramID<A> as Equal>::Output

Returns true if self and other are equal.

Source§

fn is_not_equal(&self, other: &ProgramID<A>) -> <ProgramID<A> as Equal>::Output

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Note: This method does not check the nonce equality.

Source§

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

Returns true if self and other are not equal.

Note: This method does not check the nonce equality.

Source§

type Output = Boolean<A>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

This method costs 2 constraints.

Source§

fn is_not_equal(&self, other: &Field<E>) -> <Field<E> as Equal>::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.

This method costs 2 constraints.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

This method costs 8 constraints.

Source§

fn is_not_equal(&self, other: &Group<E>) -> <Group<E> as Equal>::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.

This method costs 8 constraints.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

fn is_not_equal( &self, other: &Integer<E, I>, ) -> <Integer<E, I> as Equal>::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.

Source§

type Output = Boolean<E>

Source§

impl<E, const VARIANT: usize> Equal for BooleanHash<E, VARIANT>
where E: Environment,

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<N> Equal for snarkvm_debug::prelude::Argument<N>
where N: Network,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<N> Equal for snarkvm_debug::prelude::ComputeKey<N>
where N: Network,

Source§

impl<N> Equal for snarkvm_debug::prelude::Future<N>
where N: Network,

Source§

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

Source§

impl<N> Equal for snarkvm_debug::prelude::ProgramID<N>
where N: Network,

Source§

impl<N> Equal for snarkvm_debug::prelude::Signature<N>
where N: Network,

Source§

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

Source§

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

Source§

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