Struct PInt
pub struct PInt<U: Unsigned + NonZero> { /* private fields */ }
Type-level signed integers with positive sign.
Implementations
impl<U: Unsigned + NonZero> PInt<U>
fn new() -> PInt<U>Instantiates a singleton representing this strictly positive integer.
Trait Implementations
impl<P: Unsigned + NonZero, N: Unsigned + NonZero> Cmp<NInt<N>> for PInt<P>
type Output = Greater;
impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
type Output = <Pl as Cmp<Pr>>::Output;
impl<U> Gcd<Z0> for PInt<U>
where
U: Unsigned + NonZero,
type Output = PInt<U>;
impl<U> Max<Z0> for PInt<U>
where
U: Unsigned + NonZero,
type Output = PInt<U>;fn max(self, Z0) -> Self::Output
impl<U> Min<Z0> for PInt<U>
where
U: Unsigned + NonZero,
type Output = Z0;fn min(self, rhs: Z0) -> Self::Output
impl<U> Mul<ATerm> for PInt<U>
where
U: Unsigned + NonZero,
type Output = ATerm;fn mul(self, ATerm) -> Self::Output
impl<U> ToInt<i16> for PInt<U>
where
U: Unsigned + NonZero,
fn to_int() -> i16const INT: i16 = Self::I16;
impl<U> ToInt<i32> for PInt<U>
where
U: Unsigned + NonZero,
fn to_int() -> i32const INT: i32 = Self::I32;
impl<U> ToInt<i64> for PInt<U>
where
U: Unsigned + NonZero,
fn to_int() -> i64const INT: i64 = Self::I64;
impl<U> ToInt<i8> for PInt<U>
where
U: Unsigned + NonZero,
fn to_int() -> i8const INT: i8 = Self::I8;
impl<U> ToInt<isize> for PInt<U>
where
U: Unsigned + NonZero,
fn to_int() -> isizeconst INT: isize = Self::ISIZE;
impl<U1, U2> Gcd<NInt<U2>> for PInt<U1>
where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
type Output = PInt<<U1 as Gcd<U2>>::Output>;
impl<U1, U2> Gcd<PInt<U2>> for PInt<U1>
where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
type Output = PInt<<U1 as Gcd<U2>>::Output>;
impl<U: Clone + Unsigned + NonZero> Clone for PInt<U>
fn clone(&self) -> Self
impl<U: Copy + Unsigned + NonZero> Copy for PInt<U>
impl<U: Debug + Unsigned + NonZero> Debug for PInt<U>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<U: Default + Unsigned + NonZero> Default for PInt<U>
fn default() -> Self
impl<U: Eq + Unsigned + NonZero> Eq for PInt<U>
impl<U: Hash + Unsigned + NonZero> Hash for PInt<U>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<U: Ord + Unsigned + NonZero> Ord for PInt<U>
fn cmp(&self, other: &Self) -> Ordering
impl<U: PartialEq + Unsigned + NonZero> PartialEq for PInt<U>
fn eq(&self, other: &Self) -> bool
impl<U: PartialEq + Unsigned + NonZero> StructuralPartialEq for PInt<U>
impl<U: PartialOrd + Unsigned + NonZero> PartialOrd for PInt<U>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl<U: Unsigned + NonZero + Binary> Binary for PInt<U>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<U: Unsigned + NonZero + PowerOfTwo> PowerOfTwo for PInt<U>
impl<U: Unsigned + NonZero> Abs for PInt<U>
type Output = PInt<U>;
impl<U: Unsigned + NonZero> Add<Z0> for PInt<U>
type Output = PInt<U>;fn add(self, Z0) -> Self::Output
impl<U: Unsigned + NonZero> Cmp<Z0> for PInt<U>
type Output = Greater;
impl<U: Unsigned + NonZero> Integer for PInt<U>
const I8: i8 = U::I8;const I16: i16 = U::I16;const I32: i32 = U::I32;const I64: i64 = U::I64;const ISIZE: isize = U::ISIZE;fn to_i8() -> i8fn to_i16() -> i16fn to_i32() -> i32fn to_i64() -> i64fn to_isize() -> isize
impl<U: Unsigned + NonZero> Mul<Z0> for PInt<U>
type Output = Z0;fn mul(self, Z0) -> Self::Output
impl<U: Unsigned + NonZero> Neg for PInt<U>
type Output = NInt<U>;fn neg(self) -> Self::Output
impl<U: Unsigned + NonZero> NonZero for PInt<U>
impl<U: Unsigned + NonZero> Pow<Z0> for PInt<U>
type Output = PInt<UInt<UTerm, B1>>;fn powi(self, Z0) -> Self::Output
impl<U: Unsigned + NonZero> Sub<Z0> for PInt<U>
type Output = PInt<U>;fn sub(self, Z0) -> Self::Output
impl<Ul, Ur> Max<NInt<Ur>> for PInt<Ul>
where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
type Output = PInt<Ul>;fn max(self, NInt<Ur>) -> Self::Output
impl<Ul, Ur> Max<PInt<Ur>> for PInt<Ul>
where
Ul: Unsigned + NonZero + Max<Ur>,
Ur: Unsigned + NonZero,
Maximum<Ul, Ur>: Unsigned + NonZero,
type Output = PInt<<Ul as Max<Ur>>::Output>;fn max(self, rhs: PInt<Ur>) -> Self::Output
impl<Ul, Ur> Min<NInt<Ur>> for PInt<Ul>
where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
type Output = NInt<Ur>;fn min(self, rhs: NInt<Ur>) -> Self::Output
impl<Ul, Ur> Min<PInt<Ur>> for PInt<Ul>
where
Ul: Unsigned + NonZero + Min<Ur>,
Ur: Unsigned + NonZero,
Minimum<Ul, Ur>: Unsigned + NonZero,
type Output = PInt<<Ul as Min<Ur>>::Output>;fn min(self, rhs: PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul>
where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur> + Unsigned + NonZero,
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output;fn add(self, rhs: NInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Add<PInt<Ur>> for PInt<Ul>
where
Ul: Add<Ur> + Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
type Output = PInt<<Ul as Add<Ur>>::Output>;fn add(self, PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Div<NInt<Ur>> for PInt<Ul>
where
Ul: Cmp<Ur> + Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
type Output = <PInt<Ul> as PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>>::Output;fn div(self, rhs: NInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Div<PInt<Ur>> for PInt<Ul>
where
Ul: Cmp<Ur> + Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
type Output = <PInt<Ul> as PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>>::Output;fn div(self, rhs: PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Mul<NInt<Ur>> for PInt<Ul>
where
Ul: Mul<Ur> + Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
type Output = NInt<<Ul as Mul<Ur>>::Output>;fn mul(self, NInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for PInt<Ul>
where
Ul: Mul<Ur> + Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
type Output = PInt<<Ul as Mul<Ur>>::Output>;fn mul(self, PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Pow<PInt<Ur>> for PInt<Ul>
where
Ul: Pow<Ur> + Unsigned + NonZero,
<Ul as Pow<Ur>>::Output: Unsigned + NonZero,
type Output = PInt<<Ul as Pow<Ur>>::Output>;fn powi(self, PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Rem<NInt<Ur>> for PInt<Ul>
where
Ul: Rem<Ur> + Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>>::Output;fn rem(self, rhs: NInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for PInt<Ul>
where
Ul: Rem<Ur> + Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>>::Output;fn rem(self, rhs: PInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Sub<NInt<Ur>> for PInt<Ul>
where
Ul: Add<Ur> + Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
type Output = PInt<<Ul as Add<Ur>>::Output>;fn sub(self, NInt<Ur>) -> Self::Output
impl<Ul, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul>
where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur> + Unsigned + NonZero,
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output;fn sub(self, rhs: PInt<Ur>) -> Self::Output
impl<V, A, U> Mul<TArr<V, A>> for PInt<U>
where
U: Unsigned + NonZero,
PInt<U>: Mul<A> + Mul<V>,
type Output = TArr<<PInt<U> as Mul<V>>::Output, <PInt<U> as Mul<A>>::Output>;fn mul(self, rhs: TArr<V, A>) -> Self::Output