Trait snarkvm_circuit::Ternary
[−]pub trait Ternary {
type Boolean;
type Output;
fn ternary(
condition: &Self::Boolean,
first: &Self,
second: &Self
) -> Self::Output;
}
Expand description
Trait for ternary operations.
Required Associated Types
Required Methods
Trait Implementations
impl<E> Metrics<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static> for Address<E> where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static> for Address<E> where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static> for Field<E> where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static> for Field<E> where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static> for Group<E> where
E: Environment,
impl<E> Metrics<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static> for Group<E> where
E: Environment,
impl<E, I> Metrics<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static> for Integer<E, I> where
E: Environment,
I: IntegerType,
impl<E, I> Metrics<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static> for Integer<E, I> where
E: Environment,
I: IntegerType,
impl<E> OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static> for Address<E> where
E: Environment,
impl<E> OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static> for Address<E> where
E: Environment,
type Case = (CircuitType<Boolean<E>>, Mode, Mode)
fn output_mode(
parameter: &<Address<E> as OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
parameter: &<Address<E> as OutputMode<dyn Ternary<Output = Address<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.
impl<E> OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static> for Field<E> where
E: Environment,
impl<E> OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static> for Field<E> where
E: Environment,
type Case = (CircuitType<Boolean<E>>, Mode, Mode)
fn output_mode(
parameter: &<Field<E> as OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
parameter: &<Field<E> as OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.
impl<E> OutputMode<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static> for Group<E> where
E: Environment,
impl<E> OutputMode<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static> for Group<E> where
E: Environment,
type Case = (CircuitType<Boolean<E>>, Mode, Mode)
fn output_mode(
parameter: &<Group<E> as OutputMode<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
parameter: &<Group<E> as OutputMode<dyn Ternary<Output = Group<E>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.
impl<E, I> OutputMode<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static> for Integer<E, I> where
E: Environment,
I: IntegerType,
impl<E, I> OutputMode<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static> for Integer<E, I> where
E: Environment,
I: IntegerType,
type Case = (CircuitType<Boolean<E>>, Mode, Mode)
fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn Ternary<Output = Integer<E, I>, Boolean = Boolean<E>> + 'static>>::Case
) -> Mode
Returns the mode of the output.