[][src]Trait gridiron::digits::constant_time_primitives::ConstantUnsignedPrimitives

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

const SIZE: u32

Loading content...

Required methods

fn not(self) -> Self

fn mux(self, x: Self, y: Self) -> Self

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.

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

Removes the high bit if it's set, otherwise leaves number as is.

fn min(self, y: Self) -> Self

fn max(self, y: Self) -> Self

Loading content...

Implementations on Foreign Types

impl ConstantUnsignedPrimitives for u64[src]

impl ConstantUnsignedPrimitives for u32[src]

Loading content...

Implementors

Loading content...