pub struct PInt<U: Unsigned + NonZero> { /* private fields */ }
Expand description
Type-level signed integers with positive sign.
Implementations§
Trait Implementations§
source§impl<Ul, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul>
impl<Ul, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul>
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
source§impl<Ul: Unsigned + NonZero, Ur> Add<PInt<Ur>> for NInt<Ul>
impl<Ul: Unsigned + NonZero, Ur> Add<PInt<Ur>> for NInt<Ul>
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
source§impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
X <==> Y
source§impl<U: Ord + Unsigned + NonZero> Ord for PInt<U>
impl<U: Ord + Unsigned + NonZero> Ord for PInt<U>
source§impl<U: PartialEq + Unsigned + NonZero> PartialEq for PInt<U>
impl<U: PartialEq + Unsigned + NonZero> PartialEq for PInt<U>
source§impl<U: PartialOrd + Unsigned + NonZero> PartialOrd for PInt<U>
impl<U: PartialOrd + Unsigned + NonZero> PartialOrd for PInt<U>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul>
impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul>
N(Ul)^P(Ur) = P(Ul^Ur) if Ur is even
source§impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul>
impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul>
N(Ul)^P(Ur) = N(Ul^Ur) if Ur is odd
source§impl<Ul, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul>
impl<Ul, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul>
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
impl<U: Copy + Unsigned + NonZero> Copy for PInt<U>
impl<U: Eq + Unsigned + NonZero> Eq for PInt<U>
impl<U: Unsigned + NonZero> NonZero for PInt<U>
impl<U: Unsigned + NonZero + PowerOfTwo> PowerOfTwo for PInt<U>
impl<U: Unsigned + NonZero> StructuralPartialEq for PInt<U>
Auto Trait Implementations§
impl<U> Freeze for PInt<U>where
U: Freeze,
impl<U> RefUnwindSafe for PInt<U>where
U: RefUnwindSafe,
impl<U> Send for PInt<U>where
U: Send,
impl<U> Sync for PInt<U>where
U: Sync,
impl<U> Unpin for PInt<U>where
U: Unpin,
impl<U> UnwindSafe for PInt<U>where
U: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<M, N> PartialDiv<N> for M
impl<M, N> PartialDiv<N> for M
source§fn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
fn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
Method for performing the division