Trait snarkvm_circuit::operators::Equal
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_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, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where E: Environment, I: IntegerType,
§impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where
E: Environment,
impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where E: Environment,
§impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>where E: Environment, I: IntegerType,
Implementations on Foreign Types§
§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<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.
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>>,
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, 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> Equal<Plaintext<N>> for Plaintext<N>where
N: Network,
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
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
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>>,
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<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> 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.