pub struct PInt<U: Unsigned + NonZero> { }
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
The resulting type after applying the +
operator.
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
The resulting type after applying the +
operator.
P(Ul) + P(Ur) = P(Ul + Ur)
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
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
.
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.
$A<Ul> / $B<Ur> = $R<Ul / Ur>
The resulting type after applying the /
operator.
$A<Ul> / $B<Ur> = $R<Ul / Ur>
The resulting type after applying the /
operator.
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
The greatest common divisor.
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.
N(Ul) * P(Ur) = N(Ul * Ur)
The resulting type after applying the *
operator.
P(Ul) * P(Ur) = P(Ul * Ur)
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the -
operator.
Compares and returns the maximum of two values.
Read more
Compares and returns the minimum of two values.
Read more
Restrict a value to a certain interval.
Read more
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
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>
The resulting type after applying the %
operator.
$A<Ul> % $B<Ur> = $R<Ul % Ur>
The resulting type after applying the %
operator.
$A<Ul> % $B<Ur> = $R<Ul % Ur>
The resulting type after applying the %
operator.
P(Ul) - N(Ur) = P(Ul + Ur)
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
N(Ul) - P(Ur) = N(Ul + Ur)
The resulting type after applying the -
operator.
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The concrete value for the type. Can be used in const
contexts.
Method returning the concrete value for the type.
The concrete value for the type. Can be used in const
contexts.
Method returning the concrete value for the type.
The concrete value for the type. Can be used in const
contexts.
Method returning the concrete value for the type.
The concrete value for the type. Can be used in const
contexts.
Method returning the concrete value for the type.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dst
.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type of the result of the division
Method for performing the division
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.