Struct secret_integers::U32
source · [−]pub struct U32(pub u32);
Tuple Fields
0: u32
Implementations
sourceimpl U32
impl U32
pub fn classify<T: Into<u32>>(x: T) -> Self
sourcepub fn declassify(self) -> u32
pub fn declassify(self) -> u32
Warning: use with caution, breaks the constant-time guarantee.
pub fn zero() -> Self
pub fn one() -> Self
pub fn ones() -> Self
pub fn from_le_bytes(bytes: &[U8]) -> Vec<U32>
pub fn to_le_bytes(ints: &[U32]) -> Vec<U8>
pub fn from_be_bytes(bytes: &[U8]) -> Vec<U32>
pub fn to_be_bytes(ints: &[U32]) -> Vec<U8>
pub fn max_value() -> U32
sourceimpl U32
impl U32
sourcepub fn checked_add(self, rhs: Self) -> Self
pub fn checked_add(self, rhs: Self) -> Self
Warning: panics when overflow.
sourceimpl U32
impl U32
sourcepub fn checked_sub(self, rhs: Self) -> Self
pub fn checked_sub(self, rhs: Self) -> Self
Warning: panics when overflow.
sourceimpl U32
impl U32
sourcepub fn checked_mul(self, rhs: Self) -> Self
pub fn checked_mul(self, rhs: Self) -> Self
Warning: panics when overflow.
sourceimpl U32
impl U32
pub fn rotate_left(self, rotval: usize) -> Self
pub fn rotate_right(self, rotval: usize) -> Self
sourceimpl U32
impl U32
sourcepub fn comp_eq(self, rhs: Self) -> Self
pub fn comp_eq(self, rhs: Self) -> Self
Produces a new integer which is all ones if the two arguments are equal and all zeroes otherwise. With inspiration from Wireguard.
sourcepub fn comp_ne(self, rhs: Self) -> Self
pub fn comp_ne(self, rhs: Self) -> Self
Produces a new integer which is all ones if the first argument is different from the second argument, and all zeroes otherwise.
sourcepub fn comp_gte(self, rhs: Self) -> Self
pub fn comp_gte(self, rhs: Self) -> Self
Produces a new integer which is all ones if the first argument is greater than or equal to the second argument, and all zeroes otherwise. With inspiration from WireGuard.
sourcepub fn comp_gt(self, rhs: Self) -> Self
pub fn comp_gt(self, rhs: Self) -> Self
Produces a new integer which is all ones if the first argument is strictly greater than the second argument, and all zeroes otherwise.
Trait Implementations
sourceimpl AddAssign<U32> for U32
impl AddAssign<U32> for U32
Warning: has wrapping semantics.
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation. Read more
sourceimpl BitAndAssign<U32> for U32
impl BitAndAssign<U32> for U32
sourcefn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the &=
operation. Read more
sourceimpl BitOrAssign<U32> for U32
impl BitOrAssign<U32> for U32
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the |=
operation. Read more
sourceimpl BitXorAssign<U32> for U32
impl BitXorAssign<U32> for U32
sourcefn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the ^=
operation. Read more
sourceimpl MulAssign<U32> for U32
impl MulAssign<U32> for U32
Warning: has wrapping semantics.
sourcefn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the *=
operation. Read more
sourceimpl ShlAssign<usize> for U32
impl ShlAssign<usize> for U32
sourcefn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the <<=
operation. Read more
sourceimpl ShrAssign<usize> for U32
impl ShrAssign<usize> for U32
sourcefn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the >>=
operation. Read more
sourceimpl SubAssign<U32> for U32
impl SubAssign<U32> for U32
Warning: has wrapping semantics.
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation. Read more
impl Copy for U32
Auto Trait Implementations
impl RefUnwindSafe for U32
impl Send for U32
impl Sync for U32
impl Unpin for U32
impl UnwindSafe for U32
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more