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.

Trait Implementations§

Source§

impl<A> Metrics<dyn Equal<ComputeKey<A>, Output = Boolean<A>>> for ComputeKey<A>
where A: Aleo,

Source§

type Case = (Mode, Mode)

Source§

fn count( case: &<ComputeKey<A> as Metrics<dyn Equal<ComputeKey<A>, Output = Boolean<A>>>>::Case, ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

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

Source§

type Case = (Mode, Mode)

Source§

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

impl<E, I> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

type Case = (Mode, Mode)

Source§

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

impl<A> Metrics<dyn Equal<Signature<A>, Output = Boolean<A>>> for Signature<A>
where A: Aleo,

Source§

type Case = (Mode, Mode)

Source§

fn count( case: &<Signature<A> as Metrics<dyn Equal<Signature<A>, Output = Boolean<A>>>>::Case, ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<A> OutputMode<dyn Equal<ComputeKey<A>, Output = Boolean<A>>> for ComputeKey<A>
where A: Aleo,

Source§

type Case = (Mode, Mode)

Source§

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

Returns the mode of the output.
Source§

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

Source§

type Case = (Mode, Mode)

Source§

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

Returns the mode of the output.
Source§

impl<E, I> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

type Case = (Mode, Mode)

Source§

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

impl<A> OutputMode<dyn Equal<Signature<A>, Output = Boolean<A>>> for Signature<A>
where A: Aleo,

Source§

type Case = (Mode, Mode)

Source§

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

Returns the mode of the output.

Implementations on Foreign Types§

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.

Source§

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

Returns true if self and other are not equal.

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.

Source§

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

Returns true if self and other are not equal.

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.

Source§

type Output = Boolean<E>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Source§

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

Source§

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

Returns true if self and other are equal.

Source§

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

Returns true if self and other are not equal.

Source§

type Output = Boolean<N>

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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