Skip to main content

CondSelect

Trait CondSelect 

Source
pub trait CondSelect: Sized {
    // Required method
    fn select(bit: impl IntoChoice, if_true: &Self, if_false: &Self) -> Self;
}
Expand description

Constant-time two-way select.

Required Methods§

Source

fn select(bit: impl IntoChoice, if_true: &Self, if_false: &Self) -> 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<C> CondSelect for Projective<C>

Source§

fn select( bit: impl IntoChoice, if_true: &Projective<C>, if_false: &Projective<C>, ) -> Projective<C>

Source§

impl<C> CondSelect for Projective<C>

Source§

fn select( bit: impl IntoChoice, if_true: &Projective<C>, if_false: &Projective<C>, ) -> Projective<C>

Source§

impl<P, const N: usize> CondSelect for Fp<P, N>
where P: FpConfig<N>,

Source§

fn select( bit: impl IntoChoice, if_true: &Fp<P, N>, if_false: &Fp<P, N>, ) -> Fp<P, N>

Implementors§