Trait cryptix_bigint::digit::Digit
source · pub trait Digit: Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Rem<Output = Self> + Shl<usize, Output = Self> + Shr<usize, Output = Self> + BitOr<Output = Self> + BitOrAssign + BitAnd<Output = Self> + PartialEq + Ord + Copy + Default + Debug {
const BYTE_LEN: usize;
const ONE: Self;
const ZERO: Self;
Show 14 methods
// Required methods
fn nlz(self) -> usize;
fn bit(&self, idx: usize) -> bool;
fn size() -> usize;
fn is_zero(self) -> bool;
fn is_odd(self) -> bool;
fn carry_add(self, rhs: Self, carry: bool) -> (Self, bool);
fn overflow_add(self, rhs: Self) -> (Self, bool);
fn borrow_sub(self, rhs: Self, carry: bool) -> (Self, bool);
fn overflow_sub(self, rhs: Self) -> (Self, bool);
fn carry_mul(self, rhs: Self, carry: Self) -> (Self, Self);
fn widen_mul(self, rhs: Self) -> (Self, Self);
fn overflow_mul(self, rhs: Self) -> (Self, bool);
fn from_bool(b: bool) -> Self;
fn set_bit(self, idx: usize, b: bool) -> Self;
}Required Associated Constants§
Required Methods§
fn bit(&self, idx: usize) -> bool
fn is_zero(self) -> bool
fn is_odd(self) -> bool
sourcefn overflow_add(self, rhs: Self) -> (Self, bool)
fn overflow_add(self, rhs: Self) -> (Self, bool)
overflowing add