Trait snarkvm_circuit::One
source · pub trait One {
type Boolean: BooleanTrait;
fn one() -> Self
where
Self: Sized;
fn is_one(&self) -> Self::Boolean;
}
Expand description
Representation of the one value.
Required Associated Types
type Boolean: BooleanTrait
Required Methods
Trait Implementations
impl<E> Metrics<dyn One<Boolean = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E> Metrics<dyn One<Boolean = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E, I> Metrics<dyn One<Boolean = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Metrics<dyn One<Boolean = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E> OutputMode<dyn One<Boolean = Boolean<E>> + 'static> for Field<E>where
E: Environment,
impl<E> OutputMode<dyn One<Boolean = Boolean<E>> + 'static> for Field<E>where
E: Environment,
type Case = ()
fn output_mode(
_input: &<Field<E> as OutputMode<dyn One<Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
_input: &<Field<E> as OutputMode<dyn One<Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.
impl<E, I> OutputMode<dyn One<Boolean = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> OutputMode<dyn One<Boolean = Boolean<E>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
type Case = ()
fn output_mode(
_case: &<Integer<E, I> as OutputMode<dyn One<Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
_case: &<Integer<E, I> as OutputMode<dyn One<Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.