Skip to main content

Unsigned

Trait Unsigned 

Source
pub trait Unsigned:
    AsRef<UintRef>
    + AsMut<UintRef>
    + AddMod<Output = Self>
    + BitOps
    + Div<NonZero<Self>, Output = Self>
    + for<'a> Div<&'a NonZero<Self>, Output = Self>
    + DivRemLimb
    + FloorSquareRoot<Output = Self>
    + From<u8>
    + From<u16>
    + From<u32>
    + From<u64>
    + From<Limb>
    + Integer
    + MulMod<Output = Self>
    + NegMod<Output = Self>
    + RemLimb
    + SquareMod<Output = Self>
    + SubMod<Output = Self> {
    // Required methods
    fn as_uint_ref(&self) -> &UintRef;
    fn as_mut_uint_ref(&mut self) -> &mut UintRef;
    fn from_limb_like(limb: Limb, other: &Self) -> Self;
}
Expand description

Unsigned Integers.

Required Methods§

Source

fn as_uint_ref(&self) -> &UintRef

Borrow the limbs of this unsigned integer as a UintRef.

Source

fn as_mut_uint_ref(&mut self) -> &mut UintRef

Mutably borrow the limbs of this unsigned integer as a UintRef.

Source

fn from_limb_like(limb: Limb, other: &Self) -> Self

Returns an integer with the first limb set to limb, and the same precision as other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Unsigned for BoxedUint

Available on crate feature alloc only.
Source§

impl Unsigned for Limb

Source§

impl<const LIMBS: usize> Unsigned for Uint<LIMBS>