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

Returns first if condition is true, otherwise returns second.

Implementations on Foreign Types

Returns first if condition is true, otherwise returns second.

Returns first if condition is true, otherwise returns second.

Returns first if condition is true, otherwise returns second.

Returns first if condition is true, otherwise returns second.

Returns first if condition is true, otherwise returns second.

Implementors