pub trait Ternary {
    type Boolean;
    type Output;

    // Required method
    fn ternary(
        condition: &Self::Boolean,
        first: &Self,
        second: &Self
    ) -> Self::Output
       where Self: Sized;
}
Expand description

Trait for ternary operations.

Required Associated Types§

Required Methods§

source

fn ternary( condition: &Self::Boolean, first: &Self, second: &Self ) -> Self::Outputwhere Self: Sized,

Returns first if condition is true, otherwise returns second.

Implementors§

source§

impl<E> Ternary for Boolean<E>where E: Environment,

§

type Boolean = Boolean<E>

§

type Output = Boolean<E>

source§

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

§

type Boolean = Boolean<E>

§

type Output = Field<E>

source§

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

§

type Boolean = Boolean<E>

§

type Output = Scalar<E>

source§

impl<E: Environment> Ternary for Group<E>

§

type Boolean = Boolean<E>

§

type Output = Group<E>