Trait FromBoolean

Source
pub trait FromBoolean {
    type Boolean: BooleanTrait;

    // Required method
    fn from_boolean(boolean: &Self::Boolean) -> Self
       where Self: Sized;
}
Expand description

Unary operator for instantiating from a boolean.

Required Associated Types§

Required Methods§

Source

fn from_boolean(boolean: &Self::Boolean) -> Self
where Self: Sized,

Trait Implementations§

Source§

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

Source§

type Case = ()

Source§

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

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

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

Source§

type Case = Mode

Source§

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

Returns the mode of the output.

Implementors§