pub trait Zero {
    type Boolean: BooleanTrait;

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

Representation of the zero value.

Required Associated Types§

Required Methods§

source

fn zero() -> Selfwhere Self: Sized,

Returns a new zero constant.

source

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

Returns true if self is zero.

Trait Implementations§

§

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

§

type Case = ()

§

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

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

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

§

type Case = ()

§

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

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

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

§

type Case = ()

§

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

Returns the mode of the output.
§

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

§

type Case = ()

§

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

Returns the mode of the output.

Implementations on Foreign Types§

§

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

§

type Boolean = Boolean<E>

§

fn zero() -> Integer<E, I>

§

fn is_zero(&self) -> <Integer<E, I> as Zero>::Boolean

Implementors§

§

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

§

type Boolean = Boolean<E>

§

impl<E> Zero for Group<E>where E: Environment,

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>