Trait snarkvm_circuit::Equal
pub trait Equal<Rhs = Self>where
Rhs: ?Sized,{
type Output;
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_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.
Trait Implementations
impl<E> Metrics<dyn Equal<Field<E>, Output = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E> Metrics<dyn Equal<Field<E>, Output = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
Implementations on Foreign Types
impl<E> Equal<Address<E>> for Address<E>where
E: Environment,
impl<E> Equal<Address<E>> for Address<E>where
E: Environment,
impl<E> Equal<Boolean<E>> for Boolean<E>where
E: Environment,
impl<E> Equal<Boolean<E>> for Boolean<E>where
E: Environment,
impl<E> Equal<Field<E>> for Field<E>where
E: Environment,
impl<E> Equal<Field<E>> for Field<E>where
E: Environment,
impl<E> Equal<Group<E>> for Group<E>where
E: Environment,
impl<E> Equal<Group<E>> for Group<E>where
E: Environment,
impl<E> Equal<Scalar<E>> for Scalar<E>where
E: Environment,
impl<E> Equal<Scalar<E>> for Scalar<E>where
E: Environment,
impl<E, I> Equal<Integer<E, I>> for Integer<E, I>where
E: Environment,
I: IntegerType,
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
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
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,
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
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
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<N> Equal<Plaintext<N>> for Plaintext<N>where
N: Network,
impl<N> Equal<Plaintext<N>> for Plaintext<N>where
N: Network,
impl<N> Equal<Value<N>> for Value<N>where
N: Network,
impl<N> Equal<Value<N>> for Value<N>where
N: Network,
impl<N, Private> Equal<Entry<N, Private>> for Entry<N, Private>where
N: Network,
Private: Visibility<Boolean = 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
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
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<Literal<N>> for Literal<N>where
N: Network,
impl<N> Equal<Literal<N>> for Literal<N>where
N: Network,
impl<N> Equal<Ciphertext<N>> for Ciphertext<N>where
N: Network,
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
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
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>
impl<N, Private> Equal<Owner<N, Private>> for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = 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
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
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, Private> Equal<Record<N, Private>> for Record<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
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
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
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> Equal<Identifier<N>> for Identifier<N>where
N: Network,
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
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
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, Private> Equal<Balance<N, Private>> for Balance<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
impl<N, Private> Equal<Balance<N, Private>> for Balance<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
fn is_equal(
&self,
other: &Balance<N, Private>
) -> <Balance<N, Private> as Equal<Balance<N, Private>>>::Output
fn is_equal(
&self,
other: &Balance<N, Private>
) -> <Balance<N, Private> as Equal<Balance<N, Private>>>::Output
Returns true
if self
and other
are equal.
fn is_not_equal(
&self,
other: &Balance<N, Private>
) -> <Balance<N, Private> as Equal<Balance<N, Private>>>::Output
fn is_not_equal(
&self,
other: &Balance<N, Private>
) -> <Balance<N, Private> as Equal<Balance<N, Private>>>::Output
Returns true
if self
and other
are not equal.