Trait gridiron::digits::constant_time_primitives::ConstantUnsignedPrimitives [−][src]
pub trait ConstantUnsignedPrimitives where
Wrapping<Self>: Neg<Output = Wrapping<Self>> + BitOr<Output = Wrapping<Self>>,
Self: NumOps + Copy + BitAnd<Output = Self> + BitXor<Output = Self> + One + Zero + PartialEq, {
const SIZE: u32;
fn not(self) -> Self;
fn mux(self, x: Self, y: Self) -> Self;
fn const_eq(self, y: Self) -> ConstantBool<Self>;
fn const_eq0(self) -> ConstantBool<Self>;
fn const_neq(self, y: Self) -> ConstantBool<Self>;
fn const_gt(self, y: Self) -> ConstantBool<Self>;
fn const_ge(self, y: Self) -> ConstantBool<Self>;
fn const_lt(self, y: Self) -> ConstantBool<Self>;
fn const_le(self, y: Self) -> ConstantBool<Self>;
fn const_abs(self) -> Self;
fn min(self, y: Self) -> Self;
fn max(self, y: Self) -> Self;
}
Associated Constants
Required methods
This chooses the first value if self is 1, chooses the 2nd value if the value is 0. This is only well defined for 0 or 1. If your value can be anything except those 2, do not use this.