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§
Sourcefn is_not_equal(&self, other: &Rhs) -> Self::Output
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 ComputeKey<A>where
A: Aleo,
impl<A> Equal for ComputeKey<A>where
A: Aleo,
Source§fn is_equal(&self, other: &ComputeKey<A>) -> <ComputeKey<A> as Equal>::Output
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
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.
type Output = Boolean<A>
Source§impl<A> Equal for Signature<A>where
A: Aleo,
impl<A> Equal for Signature<A>where
A: Aleo,
Source§fn is_equal(&self, other: &Signature<A>) -> <Signature<A> as Equal>::Output
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
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.
type Output = Boolean<A>
Source§impl<A> Equal for Ciphertext<A>where
A: Aleo,
impl<A> Equal for Ciphertext<A>where
A: Aleo,
Source§fn is_equal(&self, other: &Ciphertext<A>) -> <Ciphertext<A> as Equal>::Output
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
fn is_not_equal( &self, other: &Ciphertext<A>, ) -> <Ciphertext<A> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<A>
Source§impl<A> Equal for Identifier<A>where
A: Aleo,
impl<A> Equal for Identifier<A>where
A: Aleo,
Source§fn is_equal(&self, other: &Identifier<A>) -> <Identifier<A> as Equal>::Output
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
fn is_not_equal( &self, other: &Identifier<A>, ) -> <Identifier<A> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<A>
Source§impl<A, Private> Equal for Entry<A, Private>where
A: Aleo,
Private: Visibility<A>,
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
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
fn is_not_equal( &self, other: &Entry<A, Private>, ) -> <Entry<A, Private> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<A>
Source§impl<A, Private> Equal for Owner<A, Private>where
A: Aleo,
Private: Visibility<A>,
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
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
fn is_not_equal( &self, other: &Owner<A, Private>, ) -> <Owner<A, Private> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<A>
Source§impl<A, Private> Equal for Record<A, Private>where
A: Aleo,
Private: Visibility<A>,
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
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
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.
type Output = Boolean<A>
Source§impl<E> Equal for Address<E>where
E: Environment,
impl<E> Equal for Address<E>where
E: Environment,
Source§impl<E> Equal for Boolean<E>where
E: Environment,
impl<E> Equal for Boolean<E>where
E: Environment,
Source§impl<E> Equal for Field<E>where
E: Environment,
impl<E> Equal for Field<E>where
E: Environment,
Source§fn is_equal(&self, other: &Field<E>) -> <Field<E> as Equal>::Output
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
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.
type Output = Boolean<E>
Source§impl<E> Equal for Group<E>where
E: Environment,
impl<E> Equal for Group<E>where
E: Environment,
Source§fn is_equal(&self, other: &Group<E>) -> <Group<E> as Equal>::Output
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
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.
type Output = Boolean<E>
Source§impl<E> Equal for Scalar<E>where
E: Environment,
impl<E> Equal for Scalar<E>where
E: Environment,
Source§impl<E> Equal for StringType<E>where
E: Environment,
impl<E> Equal for StringType<E>where
E: Environment,
Source§fn is_equal(&self, other: &StringType<E>) -> <StringType<E> as Equal>::Output
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
fn is_not_equal( &self, other: &StringType<E>, ) -> <StringType<E> as Equal>::Output
Returns true if self and other are not equal.
type Output = Boolean<E>
Source§impl<E, I> Equal for Integer<E, I>where
E: Environment,
I: IntegerType,
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
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
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.
type Output = Boolean<E>
Source§impl<E, const VARIANT: usize> Equal for BooleanHash<E, VARIANT>where
E: Environment,
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
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
fn is_not_equal( &self, other: &BooleanHash<E, VARIANT>, ) -> <BooleanHash<E, VARIANT> as Equal>::Output
Returns true if self and other are not equal.