Struct ramp::ll::limb_ptr::LimbsMut
[−]
[src]
pub struct LimbsMut { /* fields omitted */ }
A version of *mut Limb
that is bounds-checked when debug assertions are on
Methods
impl LimbsMut
[src]
unsafe fn new(base: *mut Limb, start: i32, end: i32) -> LimbsMut
[src]
Create a new instance, pointing at base
and valid
from base.offset(start)
to base.offset(end)
.
unsafe fn offset(self, x: isize) -> LimbsMut
[src]
Move self
to point to the x
th Limbs from the
current location.
impl LimbsMut
[src]
fn as_const(self) -> Limbs
[src]
View the LimbsMut
as a Limbs
(an explicit *const Limb
-> *mut Limb
conversion)
Methods from Deref<Target = Limb>
const BITS: usize
const B: Limb
fn high_part(self) -> Limb
[src]
Returns the high half of the limb
fn low_part(self) -> Limb
[src]
Returns the low half of the limb
fn add_overflow(self, other: Limb) -> (Limb, bool)
[src]
Performs self + other
, returning the result and whether or not the addition overflowed
fn sub_overflow(self, other: Limb) -> (Limb, bool)
[src]
Performs self - other
, returning the result and whether or not the subtraction overflowed
fn mul_lo(self, other: Limb) -> Limb
[src]
Performs self * other
returning the lower half of the product
fn mul_hi(self, other: Limb) -> Limb
[src]
Performs self * other
returning the higher half of the product
fn mul_hilo(self, other: Limb) -> (Limb, Limb)
[src]
Performs self * other
returning the two-limb result as (high, low).
fn invert(self) -> Limb
[src]
fn high_bit_set(self) -> bool
[src]
Returns whether or not the highest bit in the limb is set.
Division algorithms often require the highest limb of the divisor
to be d >= BASE/2
.
fn leading_zeros(self) -> BaseInt
[src]
Returns the number of leading zeros in the limb
fn trailing_zeros(self) -> BaseInt
[src]
Returns the number of trailing zeros in the limb
Trait Implementations
impl Copy for LimbsMut
[src]
impl Clone for LimbsMut
[src]
fn clone(&self) -> LimbsMut
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for LimbsMut
[src]
fn eq(&self, other: &LimbsMut) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialOrd for LimbsMut
[src]
fn partial_cmp(&self, other: &LimbsMut) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for LimbsMut
[src]
impl Ord for LimbsMut
[src]
fn cmp(&self, other: &LimbsMut) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
[src]
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
[src]
ord_max_min
)Compares and returns the minimum of two values. Read more
impl Deref for LimbsMut
[src]
type Target = Limb
The resulting type after dereferencing.
fn deref(&self) -> &Limb
[src]
Dereferences the value.