Trait Square

Source
pub trait Square {
    type Output;

    // Required method
    fn square(&self) -> Self::Output;
}
Expand description

Unary operator for retrieving the squared value.

Required Associated Types§

Required Methods§

Source

fn square(&self) -> Self::Output

Trait Implementations§

Source§

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

Source§

type Case = Mode

Source§

fn count( case: &<Field<E> as Metrics<dyn Square<Output = Field<E>>>>::Case, ) -> Count

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

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

Source§

type Case = Mode

Source§

fn output_mode( input: &<Field<E> as OutputMode<dyn Square<Output = Field<E>>>>::Case, ) -> Mode

Returns the mode of the output.

Implementations on Foreign Types§

Source§

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

Source§

fn square(&self) -> <Field<E> as Square>::Output

Returns the square of self.

Source§

type Output = Field<E>

Source§

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

Source§

fn square(&self) -> <Scalar<E> as Square>::Output

Returns the square of self.

Source§

type Output = Scalar<E>

Source§

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

Source§

fn square(&self) -> <Integer<E, I> as Square>::Output

Returns the square of self.

Source§

type Output = Integer<E, I>

Implementors§

Source§

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