Skip to main content

ConditionallySelectable

Trait ConditionallySelectable 

Source
pub trait ConditionallySelectable: Copy {
    // Required method
    fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self;
}
Expand description

Select between two values without branching on choice.

Required Methods§

Source

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ConditionallySelectable for u8

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Source§

impl ConditionallySelectable for u16

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Source§

impl ConditionallySelectable for u32

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Source§

impl ConditionallySelectable for u64

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Source§

impl ConditionallySelectable for u128

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Source§

impl ConditionallySelectable for usize

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Implementors§