Expand description
Type-level signed integers with positive sign.
Instantiates a singleton representing this strictly positive integer.
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output
The resulting type after applying the +
operator.
fn add(self, rhs: NInt<Ur>) -> Self::Output
P(Ul) + P(Ur) = P(Ul + Ur)
The resulting type after applying the +
operator.
fn add(self, _: PInt<Ur>) -> Self::Output
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
type Output = <Ur as PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>>::Output
The resulting type after applying the +
operator.
fn add(self, rhs: PInt<Ur>) -> Self::Output
The resulting type after applying the +
operator.
fn add(self, _: Z0) -> Self::Output
Performs copy-assignment from source
. Read more
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
$A<Ul> / $B<Ur> = $R<Ul / Ur>
The resulting type after applying the /
operator.
fn div(self, rhs: NInt<Ur>) -> Self::Output
$A<Ul> / $B<Ur> = $R<Ul / Ur>
The resulting type after applying the /
operator.
fn div(self, rhs: PInt<Ur>) -> Self::Output
$A<Ul> / $B<Ur> = $R<Ul / Ur>
The resulting type after applying the /
operator.
fn div(self, rhs: PInt<Ur>) -> Self::Output
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
1.3.0
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
The type of the maximum of Self
and Rhs
Method returning the maximum
The type of the maximum of Self
and Rhs
Method returning the maximum
The type of the maximum of Self
and Rhs
Method returning the maximum
The type of the maximum of Self
and Rhs
Method returning the maximum
The type of the maximum of Self
and Rhs
Method returning the maximum
The type of the minimum of Self
and Rhs
Method returning the minimum
The type of the minimum of Self
and Rhs
Method returning the minimum
The type of the minimum of Self
and Rhs
Method returning the minimum
The type of the minimum of Self
and Rhs
Method returning the minimum
The type of the minimum of Self
and Rhs
Method returning the minimum
The resulting type after applying the *
operator.
P(Ul) * N(Ur) = N(Ul * Ur)
The resulting type after applying the *
operator.
fn mul(self, _: NInt<Ur>) -> Self::Output
P(Ul) * P(Ur) = P(Ul * Ur)
The resulting type after applying the *
operator.
fn mul(self, _: PInt<Ur>) -> Self::Output
N(Ul) * P(Ur) = N(Ul * Ur)
The resulting type after applying the *
operator.
fn mul(self, _: PInt<Ur>) -> Self::Output
The resulting type after applying the *
operator.
fn mul(self, rhs: TArr<V, A>) -> Self::Output
The resulting type after applying the *
operator.
fn mul(self, _: Z0) -> Self::Output
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
fn cmp(&self, other: &PInt<U>) -> Ordering
This method returns an [Ordering
] between self
and other
. Read more
1.21.0
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0
fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval. Read more
fn eq(&self, other: &PInt<U>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PInt<U>) -> bool
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0
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 more
1.0.0
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
1.0.0
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
N(Ul)^P(Ur) = P(Ul^Ur) if Ur is even
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
N(Ul)^P(Ur) = N(Ul^Ur) if Ur is odd
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
The result of the exponentiation.
This function isn’t used in this crate, but may be useful for others.
It is implemented for primitives. Read more
$A<Ul> % $B<Ur> = $R<Ul % Ur>
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>>::Output
The resulting type after applying the %
operator.
fn rem(self, rhs: NInt<Ur>) -> Self::Output
$A<Ul> % $B<Ur> = $R<Ul % Ur>
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>>::Output
The resulting type after applying the %
operator.
fn rem(self, rhs: PInt<Ur>) -> Self::Output
$A<Ul> % $B<Ur> = $R<Ul % Ur>
type Output = <NInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>>::Output
The resulting type after applying the %
operator.
fn rem(self, rhs: PInt<Ur>) -> Self::Output
P(Ul) - N(Ur) = P(Ul + Ur)
The resulting type after applying the -
operator.
fn sub(self, _: NInt<Ur>) -> Self::Output
The resulting type after applying the -
operator.
fn sub(self, _: PInt<U>) -> Self::Output
N(Ul) - P(Ur) = N(Ul + Ur)
The resulting type after applying the -
operator.
fn sub(self, _: PInt<Ur>) -> Self::Output
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output
The resulting type after applying the -
operator.
fn sub(self, rhs: PInt<Ur>) -> Self::Output
The resulting type after applying the -
operator.
fn sub(self, _: Z0) -> Self::Output
Method returning the concrete value for the type.
Method returning the concrete value for the type.
Method returning the concrete value for the type.
Method returning the concrete value for the type.
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<T> Any for T where
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
type Output = <M as Div<N>>::Output
The type of the result of the division
Method for performing the division
impl<T, U> TryFrom<U> for T where
U: Into<T>,
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>