Struct crypto_bigint::limb::Limb [−][src]
#[repr(transparent)]pub struct Limb(pub Inner);
Expand description
Big integers are represented as an array of smaller CPU word-size integers called “limbs”.
Tuple Fields
0: Inner
Implementations
Computes self + rhs + carry
, returning the result along with the new carry.
Perform wrapping addition, discarding overflow.
Perform checked addition, returning a CtOption
which is_some
only
if the operation did not overflow.
Perform a comparison of the inner value in variable-time.
Note that the PartialOrd
and Ord
impls wrap constant-time
comparisons using the subtle
crate.
Performs an equality check in variable-time.
Computes self + (b * c) + carry
, returning the result along with the new carry.
Perform wrapping multiplication, discarding overflow.
Perform checked multiplication, returning a CtOption
which is_some
only if the operation did not overflow.
Computes self - (rhs + borrow)
, returning the result along with the new borrow.
Perform wrapping subtraction, discarding underflow and wrapping around the boundary of the type.
Perform checked subtraction, returning a CtOption
which is_some
only if the operation did not overflow.
Trait Implementations
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Limb
impl UnwindSafe for Limb
Blanket Implementations
Mutably borrows from an owned value. Read more