Trait One

Source
pub trait One {
    type Boolean: BooleanTrait;

    // Required methods
    fn one() -> Self
       where Self: Sized;
    fn is_one(&self) -> Self::Boolean;
}
Expand description

Representation of the one value.

Required Associated Types§

Required Methods§

Source

fn one() -> Self
where Self: Sized,

Returns a new one constant.

Source

fn is_one(&self) -> Self::Boolean

Returns true if self is one.

Trait Implementations§

Source§

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

Source§

type Case = ()

Source§

fn count( _parameter: &<Field<E> as Metrics<dyn One<Boolean = Boolean<E>>>>::Case, ) -> Count

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

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

Source§

type Case = ()

Source§

fn count( _case: &<Integer<E, I> as Metrics<dyn One<Boolean = Boolean<E>>>>::Case, ) -> Count

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

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

Source§

type Case = ()

Source§

fn output_mode( _input: &<Field<E> as OutputMode<dyn One<Boolean = Boolean<E>>>>::Case, ) -> Mode

Returns the mode of the output.
Source§

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

Source§

type Case = ()

Source§

fn output_mode( _case: &<Integer<E, I> as OutputMode<dyn One<Boolean = Boolean<E>>>>::Case, ) -> Mode

Returns the mode of the output.

Implementors§

Source§

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

Source§

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

Source§

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