Struct secret_integers::I16
source · pub struct I16(pub i16);
Tuple Fields§
§0: i16
Implementations§
source§impl I16
impl I16
pub fn classify<T: Into<i16>>(x: T) -> Self
sourcepub fn declassify(self) -> i16
pub fn declassify(self) -> i16
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<I16>
pub fn to_le_bytes(ints: &[I16]) -> Vec<U8>
pub fn from_be_bytes(bytes: &[U8]) -> Vec<I16>
pub fn to_be_bytes(ints: &[I16]) -> Vec<U8>
pub fn max_value() -> I16
source§impl I16
impl I16
sourcepub fn checked_add(self, rhs: Self) -> Self
pub fn checked_add(self, rhs: Self) -> Self
Warning: panics when overflow.
source§impl I16
impl I16
sourcepub fn checked_sub(self, rhs: Self) -> Self
pub fn checked_sub(self, rhs: Self) -> Self
Warning: panics when overflow.
source§impl I16
impl I16
sourcepub fn checked_mul(self, rhs: Self) -> Self
pub fn checked_mul(self, rhs: Self) -> Self
Warning: panics when overflow.
source§impl I16
impl I16
pub fn rotate_left(self, rotval: usize) -> Self
pub fn rotate_right(self, rotval: usize) -> Self
source§impl I16
impl I16
pub fn comp_eq(self, rhs: Self) -> Self
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
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§
source§impl AddAssign<I16> for I16
impl AddAssign<I16> for I16
Warning: has wrapping semantics.
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl BitAndAssign<I16> for I16
impl BitAndAssign<I16> for I16
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moresource§impl BitOrAssign<I16> for I16
impl BitOrAssign<I16> for I16
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl BitXorAssign<I16> for I16
impl BitXorAssign<I16> for I16
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moresource§impl MulAssign<I16> for I16
impl MulAssign<I16> for I16
Warning: has wrapping semantics.
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl ShlAssign<usize> for I16
impl ShlAssign<usize> for I16
source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<=
operation. Read moresource§impl ShrAssign<usize> for I16
impl ShrAssign<usize> for I16
source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>=
operation. Read moresource§impl SubAssign<I16> for I16
impl SubAssign<I16> for I16
Warning: has wrapping semantics.
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read more