pub struct BoundedI64<const MIN: i64, const MAX: i64>(/* private fields */);
Expand description
An
i64
constrained to be in the range MIN..=MAX
.
Implementations§
Source§impl<const MIN: i64, const MAX: i64> BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BoundedI64<MIN, MAX>
Sourcepub const fn const_new<const N: i64>() -> Self
pub const fn const_new<const N: i64>() -> Self
Creates a bounded integer whose value is known at compile time.
Causes a compile-time error if N
is not in the valid range.
Sourcepub const unsafe fn new_unchecked(n: i64) -> Self
pub const unsafe fn new_unchecked(n: i64) -> Self
Sourcepub const unsafe fn new_ref_unchecked(n: &i64) -> &Self
pub const unsafe fn new_ref_unchecked(n: &i64) -> &Self
Sourcepub const unsafe fn new_mut_unchecked(n: &mut i64) -> &mut Self
pub const unsafe fn new_mut_unchecked(n: &mut i64) -> &mut Self
Sourcepub const fn in_range(n: i64) -> bool
pub const fn in_range(n: i64) -> bool
Checks whether the given value is in the range of the bounded integer.
Sourcepub const fn new_saturating(n: i64) -> Self
pub const fn new_saturating(n: i64) -> Self
Sourcepub const fn new_wrapping<__Z: LargerInt>(n: __Z) -> Self
pub const fn new_wrapping<__Z: LargerInt>(n: __Z) -> Self
Creates a bounded integer by wrapping using modular arithmetic.
For n
in range, this is an identity function, and it wraps for n
out of range.
The type parameter Z
must be any integer type that is a superset of this one.
Sourcepub const fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseError>
pub const fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseError>
Converts a string slice in a given base to the bounded integer.
§Panics
Panics if radix
is below 2 or above 36.
Sourcepub const fn get_ref(&self) -> &i64
pub const fn get_ref(&self) -> &i64
Returns a shared reference to the value of the bounded integer.
Sourcepub const unsafe fn get_mut(&mut self) -> &mut i64
pub const unsafe fn get_mut(&mut self) -> &mut i64
Returns a mutable reference to the value of the bounded integer.
§Safety
This value must never be set to a value beyond the range of the bounded integer.
Sourcepub const fn abs(self) -> Self
pub const fn abs(self) -> Self
Computes the absolute value of self
, panicking if it is out of range.
Sourcepub const fn pow(self, exp: u32) -> Self
pub const fn pow(self, exp: u32) -> Self
Raises self
to the power of exp
, using exponentiation by squaring. Panics if it
is out of range.
Sourcepub const fn div_euclid(self, rhs: i64) -> Self
pub const fn div_euclid(self, rhs: i64) -> Self
Calculates the quotient of Euclidean division of self
by rhs
. Panics if rhs
is 0 or the result is out of range.
Sourcepub const fn rem_euclid(self, rhs: i64) -> Self
pub const fn rem_euclid(self, rhs: i64) -> Self
Calculates the least nonnegative remainder of self (mod rhs)
. Panics if rhs
is 0
or the result is out of range.
Sourcepub const fn checked_add(self, rhs: i64) -> Option<Self>
pub const fn checked_add(self, rhs: i64) -> Option<Self>
Checked integer addition.
Returns None
if the result would be out of range.
Sourcepub const fn saturating_add(self, rhs: i64) -> Self
pub const fn saturating_add(self, rhs: i64) -> Self
Saturating integer addition.
Sourcepub const fn wrapping_add(self, rhs: i64) -> Self
pub const fn wrapping_add(self, rhs: i64) -> Self
Wrapping (modular) integer addition.
Sourcepub const fn checked_sub(self, rhs: i64) -> Option<Self>
pub const fn checked_sub(self, rhs: i64) -> Option<Self>
Checked integer subtraction.
Returns None
if the result would be out of range.
Sourcepub const fn saturating_sub(self, rhs: i64) -> Self
pub const fn saturating_sub(self, rhs: i64) -> Self
Saturating integer subtraction.
Sourcepub const fn wrapping_sub(self, rhs: i64) -> Self
pub const fn wrapping_sub(self, rhs: i64) -> Self
Wrapping (modular) integer subtraction.
Sourcepub const fn checked_mul(self, rhs: i64) -> Option<Self>
pub const fn checked_mul(self, rhs: i64) -> Option<Self>
Checked integer multiplication.
Returns None
if the result would be out of range.
Sourcepub const fn saturating_mul(self, rhs: i64) -> Self
pub const fn saturating_mul(self, rhs: i64) -> Self
Saturating integer multiplication.
Sourcepub const fn wrapping_mul(self, rhs: i64) -> Self
pub const fn wrapping_mul(self, rhs: i64) -> Self
Wrapping (modular) integer multiplication.
Sourcepub const fn checked_div(self, rhs: i64) -> Option<Self>
pub const fn checked_div(self, rhs: i64) -> Option<Self>
Checked integer division.
Returns None
if the result would be out of range, or if rhs
is zero.
Sourcepub const fn wrapping_div(self, rhs: i64) -> Self
pub const fn wrapping_div(self, rhs: i64) -> Self
Wrapping (modular) integer division.
Sourcepub const fn checked_div_euclid(self, rhs: i64) -> Option<Self>
pub const fn checked_div_euclid(self, rhs: i64) -> Option<Self>
Checked Euclidean division.
Returns None
if the result would be out of range, or if rhs
is zero.
Sourcepub const fn wrapping_div_euclid(self, rhs: i64) -> Self
pub const fn wrapping_div_euclid(self, rhs: i64) -> Self
Wrapping (modular) Euclidean division.
Sourcepub const fn checked_rem(self, rhs: i64) -> Option<Self>
pub const fn checked_rem(self, rhs: i64) -> Option<Self>
Checked integer remainder.
Returns None
if the result would be out of range, or if rhs
is zero.
Sourcepub const fn wrapping_rem(self, rhs: i64) -> Self
pub const fn wrapping_rem(self, rhs: i64) -> Self
Wrapping (modular) integer remainder.
Sourcepub const fn checked_rem_euclid(self, rhs: i64) -> Option<Self>
pub const fn checked_rem_euclid(self, rhs: i64) -> Option<Self>
Checked Euclidean remainder.
Returns None
if the result would be out of range, or if rhs
is zero.
Sourcepub const fn wrapping_rem_euclid(self, rhs: i64) -> Self
pub const fn wrapping_rem_euclid(self, rhs: i64) -> Self
Wrapping (modular) Euclidean remainder.
Sourcepub const fn checked_neg(self) -> Option<Self>
pub const fn checked_neg(self) -> Option<Self>
Checked negation.
Returns None
if the result would be out of range.
Sourcepub const fn saturating_neg(self) -> Self
pub const fn saturating_neg(self) -> Self
Saturating negation.
Sourcepub const fn wrapping_neg(self) -> Self
pub const fn wrapping_neg(self) -> Self
Wrapping (modular) negation.
Sourcepub const fn checked_abs(self) -> Option<Self>
pub const fn checked_abs(self) -> Option<Self>
Checked absolute value.
Sourcepub const fn saturating_abs(self) -> Self
pub const fn saturating_abs(self) -> Self
Saturating absolute value.
Sourcepub const fn wrapping_abs(self) -> Self
pub const fn wrapping_abs(self) -> Self
Wrapping (modular) absolute value.
Sourcepub const fn checked_pow(self, rhs: u32) -> Option<Self>
pub const fn checked_pow(self, rhs: u32) -> Option<Self>
Checked exponentiation.
Sourcepub const fn saturating_pow(self, rhs: u32) -> Self
pub const fn saturating_pow(self, rhs: u32) -> Self
Saturating exponentiation.
Sourcepub const fn wrapping_pow(self, exp: u32) -> Self
pub const fn wrapping_pow(self, exp: u32) -> Self
Wrapping (modular) exponentiation.
Sourcepub const fn checked_shl(self, rhs: u32) -> Option<Self>
pub const fn checked_shl(self, rhs: u32) -> Option<Self>
Checked shift left.
Sourcepub const fn checked_shr(self, rhs: u32) -> Option<Self>
pub const fn checked_shr(self, rhs: u32) -> Option<Self>
Checked shift right.
Trait Implementations§
Source§impl<const MIN: i64, const MAX: i64> Add<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Add<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
+
operator.Source§impl<const MIN: i64, const MAX: i64> Add<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Add<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
+
operator.Source§impl<const MIN: i64, const MAX: i64> Add<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Add<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
+
operator.Source§impl<const MIN: i64, const MAX: i64> Add for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Add for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
+
operator.Source§impl<const MIN: i64, const MAX: i64> AddAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> AddAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn add_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn add_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
+=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> AddAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> AddAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn add_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn add_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
+=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> AddAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> AddAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn add_assign(&mut self, rhs: &i64)
fn add_assign(&mut self, rhs: &i64)
+=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> AddAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> AddAssign<BoundedI64<MIN, MAX>> for i64
Source§fn add_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn add_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
+=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> AddAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> AddAssign<i64> for BoundedI64<MIN, MAX>
Source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
+=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> AddAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> AddAssign for BoundedI64<MIN, MAX>
Source§fn add_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn add_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
+=
operation. Read moreSource§impl<'__a, const MIN: i64, const MAX: i64> Arbitrary<'__a> for BoundedI64<MIN, MAX>
Available on crate feature arbitrary1
only.
impl<'__a, const MIN: i64, const MAX: i64> Arbitrary<'__a> for BoundedI64<MIN, MAX>
arbitrary1
only.Source§fn arbitrary(u: &mut Unstructured<'__a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'__a>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl<__T, const MIN: i64, const MAX: i64> AsPrimitive<__T> for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<__T, const MIN: i64, const MAX: i64> AsPrimitive<__T> for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> BitAnd<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAnd<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
&
operator.Source§impl<const MIN: i64, const MAX: i64> BitAnd<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAnd<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
&
operator.Source§impl<const MIN: i64, const MAX: i64> BitAnd<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAnd<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
&
operator.Source§impl<const MIN: i64, const MAX: i64> BitAnd for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAnd for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
&
operator.Source§impl<const MIN: i64, const MAX: i64> BitAndAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAndAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn bitand_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitand_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitAndAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitAndAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn bitand_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitand_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitAndAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAndAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn bitand_assign(&mut self, rhs: &i64)
fn bitand_assign(&mut self, rhs: &i64)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitAndAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitAndAssign<BoundedI64<MIN, MAX>> for i64
Source§fn bitand_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitand_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitAndAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAndAssign<i64> for BoundedI64<MIN, MAX>
Source§fn bitand_assign(&mut self, rhs: i64)
fn bitand_assign(&mut self, rhs: i64)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitAndAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitAndAssign for BoundedI64<MIN, MAX>
Source§fn bitand_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitand_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
&=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOr<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOr<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
|
operator.Source§impl<const MIN: i64, const MAX: i64> BitOr<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOr<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
|
operator.Source§impl<const MIN: i64, const MAX: i64> BitOr<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOr<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
|
operator.Source§impl<const MIN: i64, const MAX: i64> BitOr for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOr for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
|
operator.Source§impl<const MIN: i64, const MAX: i64> BitOrAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOrAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn bitor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOrAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitOrAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn bitor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOrAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOrAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn bitor_assign(&mut self, rhs: &i64)
fn bitor_assign(&mut self, rhs: &i64)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOrAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitOrAssign<BoundedI64<MIN, MAX>> for i64
Source§fn bitor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOrAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOrAssign<i64> for BoundedI64<MIN, MAX>
Source§fn bitor_assign(&mut self, rhs: i64)
fn bitor_assign(&mut self, rhs: i64)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitOrAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitOrAssign for BoundedI64<MIN, MAX>
Source§fn bitor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
|=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXor<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXor<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
^
operator.Source§impl<const MIN: i64, const MAX: i64> BitXor<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXor<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
^
operator.Source§impl<const MIN: i64, const MAX: i64> BitXor<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXor<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
^
operator.Source§impl<const MIN: i64, const MAX: i64> BitXor for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXor for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
^
operator.Source§impl<const MIN: i64, const MAX: i64> BitXorAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXorAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn bitxor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXorAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitXorAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn bitxor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXorAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXorAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn bitxor_assign(&mut self, rhs: &i64)
fn bitxor_assign(&mut self, rhs: &i64)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXorAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> BitXorAssign<BoundedI64<MIN, MAX>> for i64
Source§fn bitxor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXorAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXorAssign<i64> for BoundedI64<MIN, MAX>
Source§fn bitxor_assign(&mut self, rhs: i64)
fn bitxor_assign(&mut self, rhs: i64)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> BitXorAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> BitXorAssign for BoundedI64<MIN, MAX>
Source§fn bitxor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
^=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> Bounded for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> Bounded for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> CheckedAdd for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedAdd for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_add(&self, v: &Self) -> Option<Self>
fn checked_add(&self, v: &Self) -> Option<Self>
None
is
returned.Source§impl<const MIN: i64, const MAX: i64> CheckedDiv for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedDiv for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_div(&self, v: &Self) -> Option<Self>
fn checked_div(&self, v: &Self) -> Option<Self>
None
is returned.Source§impl<const MIN: i64, const MAX: i64> CheckedMul for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedMul for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_mul(&self, v: &Self) -> Option<Self>
fn checked_mul(&self, v: &Self) -> Option<Self>
None
is returned.Source§impl<const MIN: i64, const MAX: i64> CheckedNeg for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedNeg for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_neg(&self) -> Option<Self>
fn checked_neg(&self) -> Option<Self>
None
for results that can’t be represented, like signed MIN
values that can’t be positive, or non-zero unsigned values that can’t be negative. Read moreSource§impl<const MIN: i64, const MAX: i64> CheckedRem for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedRem for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_rem(&self, v: &Self) -> Option<Self>
fn checked_rem(&self, v: &Self) -> Option<Self>
None
is returned. Read moreSource§impl<const MIN: i64, const MAX: i64> CheckedShl for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedShl for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> CheckedShr for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedShr for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> CheckedSub for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> CheckedSub for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn checked_sub(&self, v: &Self) -> Option<Self>
fn checked_sub(&self, v: &Self) -> Option<Self>
None
is returned.Source§impl<const MIN: i64, const MAX: i64> Contiguous for BoundedI64<MIN, MAX>where
Self: 'static,
Available on crate feature bytemuck1
only.
impl<const MIN: i64, const MAX: i64> Contiguous for BoundedI64<MIN, MAX>where
Self: 'static,
bytemuck1
only.Source§const MAX_VALUE: i64 = Self::MAX_VALUE
const MAX_VALUE: i64 = Self::MAX_VALUE
Source§const MIN_VALUE: i64 = Self::MIN_VALUE
const MIN_VALUE: i64 = Self::MIN_VALUE
Source§type Int = i64
type Int = i64
Source§fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read moreSource§fn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moreSource§impl<'__de, const MIN: i64, const MAX: i64> Deserialize<'__de> for BoundedI64<MIN, MAX>
Available on crate feature serde1
only.
impl<'__de, const MIN: i64, const MAX: i64> Deserialize<'__de> for BoundedI64<MIN, MAX>
serde1
only.Source§fn deserialize<D: Deserializer<'__de>>(
deserializer: D,
) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'__de>>( deserializer: D, ) -> Result<Self, D::Error>
Source§impl<const MIN: i64, const MAX: i64> Div<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Div<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
/
operator.Source§impl<const MIN: i64, const MAX: i64> Div<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Div<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
/
operator.Source§impl<const MIN: i64, const MAX: i64> Div<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Div<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
/
operator.Source§impl<const MIN: i64, const MAX: i64> Div for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Div for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
/
operator.Source§impl<const MIN: i64, const MAX: i64> DivAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> DivAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn div_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn div_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> DivAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> DivAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn div_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn div_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> DivAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> DivAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn div_assign(&mut self, rhs: &i64)
fn div_assign(&mut self, rhs: &i64)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> DivAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> DivAssign<BoundedI64<MIN, MAX>> for i64
Source§fn div_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn div_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> DivAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> DivAssign<i64> for BoundedI64<MIN, MAX>
Source§fn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> DivAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> DivAssign for BoundedI64<MIN, MAX>
Source§fn div_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn div_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
/=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> From<BoundedI64<MIN, MAX>> for i128
impl<const MIN: i64, const MAX: i64> From<BoundedI64<MIN, MAX>> for i128
Source§fn from(bounded: BoundedI64<MIN, MAX>) -> Self
fn from(bounded: BoundedI64<MIN, MAX>) -> Self
Source§impl<const MIN: i64, const MAX: i64> From<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> From<BoundedI64<MIN, MAX>> for i64
Source§fn from(bounded: BoundedI64<MIN, MAX>) -> Self
fn from(bounded: BoundedI64<MIN, MAX>) -> Self
Source§impl<const MIN: i64, const MAX: i64> FromPrimitive for BoundedI64<MIN, MAX>where
i64: FromPrimitive,
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> FromPrimitive for BoundedI64<MIN, MAX>where
i64: FromPrimitive,
num-traits02
only.Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§impl<const MIN: i64, const MAX: i64> IntoBytes for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> IntoBytes for BoundedI64<MIN, MAX>
Source§impl<const MIN: i64, const MAX: i64> Mul<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Mul<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
*
operator.Source§impl<const MIN: i64, const MAX: i64> Mul<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Mul<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
*
operator.Source§impl<const MIN: i64, const MAX: i64> Mul<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Mul<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
*
operator.Source§impl<const MIN: i64, const MAX: i64> Mul for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Mul for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
*
operator.Source§impl<__A, __B, const MIN: i64, const MAX: i64> MulAdd<__A, __B> for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<__A, __B, const MIN: i64, const MAX: i64> MulAdd<__A, __B> for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> MulAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> MulAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn mul_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn mul_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> MulAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> MulAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn mul_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn mul_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> MulAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> MulAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn mul_assign(&mut self, rhs: &i64)
fn mul_assign(&mut self, rhs: &i64)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> MulAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> MulAssign<BoundedI64<MIN, MAX>> for i64
Source§fn mul_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn mul_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> MulAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> MulAssign<i64> for BoundedI64<MIN, MAX>
Source§fn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> MulAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> MulAssign for BoundedI64<MIN, MAX>
Source§fn mul_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn mul_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
*=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> NumCast for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> NumCast for BoundedI64<MIN, MAX>
num-traits02
only.Source§impl<const MIN: i64, const MAX: i64> Ord for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Ord for BoundedI64<MIN, MAX>
Source§fn cmp(&self, other: &BoundedI64<MIN, MAX>) -> Ordering
fn cmp(&self, other: &BoundedI64<MIN, MAX>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<const MIN: i64, const MAX: i64> PartialOrd<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> PartialOrd<BoundedI64<MIN, MAX>> for i64
Source§impl<const MIN: i64, const MAX: i64> PartialOrd<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> PartialOrd<i64> for BoundedI64<MIN, MAX>
Source§impl<const MIN: i64, const MAX: i64> PartialOrd for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> PartialOrd for BoundedI64<MIN, MAX>
Source§impl<'__a, const MIN: i64, const MAX: i64> Product<&'__a BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<'__a, const MIN: i64, const MAX: i64> Product<&'__a BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§impl<'__a, const MIN: i64, const MAX: i64> Product<&'__a BoundedI64<MIN, MAX>> for i64
impl<'__a, const MIN: i64, const MAX: i64> Product<&'__a BoundedI64<MIN, MAX>> for i64
Source§fn product<I: Iterator<Item = &'__a BoundedI64<MIN, MAX>>>(iter: I) -> Self
fn product<I: Iterator<Item = &'__a BoundedI64<MIN, MAX>>>(iter: I) -> Self
Self
from the elements by multiplying
the items.Source§impl<const MIN: i64, const MAX: i64> Product<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> Product<BoundedI64<MIN, MAX>> for i64
Source§fn product<I: Iterator<Item = BoundedI64<MIN, MAX>>>(iter: I) -> Self
fn product<I: Iterator<Item = BoundedI64<MIN, MAX>>>(iter: I) -> Self
Self
from the elements by multiplying
the items.Source§impl<const MIN: i64, const MAX: i64> Rem<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Rem<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
%
operator.Source§impl<const MIN: i64, const MAX: i64> Rem<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Rem<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
%
operator.Source§impl<const MIN: i64, const MAX: i64> Rem<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Rem<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
%
operator.Source§impl<const MIN: i64, const MAX: i64> Rem for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Rem for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
%
operator.Source§impl<const MIN: i64, const MAX: i64> RemAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> RemAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn rem_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn rem_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> RemAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> RemAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn rem_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn rem_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> RemAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> RemAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn rem_assign(&mut self, rhs: &i64)
fn rem_assign(&mut self, rhs: &i64)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> RemAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> RemAssign<BoundedI64<MIN, MAX>> for i64
Source§fn rem_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn rem_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> RemAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> RemAssign<i64> for BoundedI64<MIN, MAX>
Source§fn rem_assign(&mut self, rhs: i64)
fn rem_assign(&mut self, rhs: i64)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> RemAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> RemAssign for BoundedI64<MIN, MAX>
Source§fn rem_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn rem_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
%=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SaturatingAdd for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> SaturatingAdd for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn saturating_add(&self, v: &Self) -> Self
fn saturating_add(&self, v: &Self) -> Self
self + other
, saturating at the relevant high or low boundary of
the type.Source§impl<const MIN: i64, const MAX: i64> SaturatingMul for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> SaturatingMul for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn saturating_mul(&self, v: &Self) -> Self
fn saturating_mul(&self, v: &Self) -> Self
self * other
, saturating at the relevant high or low boundary of
the type.Source§impl<const MIN: i64, const MAX: i64> SaturatingSub for BoundedI64<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> SaturatingSub for BoundedI64<MIN, MAX>
num-traits02
only.Source§fn saturating_sub(&self, v: &Self) -> Self
fn saturating_sub(&self, v: &Self) -> Self
self - other
, saturating at the relevant high or low boundary of
the type.Source§impl<const MIN: i64, const MAX: i64> Serialize for BoundedI64<MIN, MAX>
Available on crate feature serde1
only.
impl<const MIN: i64, const MAX: i64> Serialize for BoundedI64<MIN, MAX>
serde1
only.Source§impl<const MIN: i64, const MAX: i64> ShlAssign<&u32> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> ShlAssign<&u32> for BoundedI64<MIN, MAX>
Source§fn shl_assign(&mut self, rhs: &u32)
fn shl_assign(&mut self, rhs: &u32)
<<=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> ShlAssign<u32> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> ShlAssign<u32> for BoundedI64<MIN, MAX>
Source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
<<=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> ShrAssign<&u32> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> ShrAssign<&u32> for BoundedI64<MIN, MAX>
Source§fn shr_assign(&mut self, rhs: &u32)
fn shr_assign(&mut self, rhs: &u32)
>>=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> ShrAssign<u32> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> ShrAssign<u32> for BoundedI64<MIN, MAX>
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
>>=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> Step for BoundedI64<MIN, MAX>
Available on crate feature step_trait
only.
impl<const MIN: i64, const MAX: i64> Step for BoundedI64<MIN, MAX>
step_trait
only.Source§fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
step_trait
)start
to end
like Iterator::size_hint()
. Read moreSource§fn forward_checked(start: Self, count: usize) -> Option<Self>
fn forward_checked(start: Self, count: usize) -> Option<Self>
step_trait
)Source§fn backward_checked(start: Self, count: usize) -> Option<Self>
fn backward_checked(start: Self, count: usize) -> Option<Self>
step_trait
)Source§fn forward(start: Self, count: usize) -> Self
fn forward(start: Self, count: usize) -> Self
step_trait
)Source§unsafe fn forward_unchecked(start: Self, count: usize) -> Self
unsafe fn forward_unchecked(start: Self, count: usize) -> Self
step_trait
)Source§fn backward(start: Self, count: usize) -> Self
fn backward(start: Self, count: usize) -> Self
step_trait
)Source§unsafe fn backward_unchecked(start: Self, count: usize) -> Self
unsafe fn backward_unchecked(start: Self, count: usize) -> Self
step_trait
)Source§impl<const MIN: i64, const MAX: i64> Sub<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Sub<&BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
-
operator.Source§impl<const MIN: i64, const MAX: i64> Sub<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Sub<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
-
operator.Source§impl<const MIN: i64, const MAX: i64> Sub<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Sub<BoundedI64<MIN, MAX>> for &BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
-
operator.Source§impl<const MIN: i64, const MAX: i64> Sub for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Sub for BoundedI64<MIN, MAX>
Source§type Output = BoundedI64<MIN, MAX>
type Output = BoundedI64<MIN, MAX>
-
operator.Source§impl<const MIN: i64, const MAX: i64> SubAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> SubAssign<&BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§fn sub_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn sub_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
-=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SubAssign<&BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> SubAssign<&BoundedI64<MIN, MAX>> for i64
Source§fn sub_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
fn sub_assign(&mut self, rhs: &BoundedI64<MIN, MAX>)
-=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SubAssign<&i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> SubAssign<&i64> for BoundedI64<MIN, MAX>
Source§fn sub_assign(&mut self, rhs: &i64)
fn sub_assign(&mut self, rhs: &i64)
-=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SubAssign<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> SubAssign<BoundedI64<MIN, MAX>> for i64
Source§fn sub_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn sub_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
-=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SubAssign<i64> for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> SubAssign<i64> for BoundedI64<MIN, MAX>
Source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
-=
operation. Read moreSource§impl<const MIN: i64, const MAX: i64> SubAssign for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> SubAssign for BoundedI64<MIN, MAX>
Source§fn sub_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
fn sub_assign(&mut self, rhs: BoundedI64<MIN, MAX>)
-=
operation. Read moreSource§impl<'__a, const MIN: i64, const MAX: i64> Sum<&'__a BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
impl<'__a, const MIN: i64, const MAX: i64> Sum<&'__a BoundedI64<MIN, MAX>> for BoundedI64<MIN, MAX>
Source§impl<'__a, const MIN: i64, const MAX: i64> Sum<&'__a BoundedI64<MIN, MAX>> for i64
impl<'__a, const MIN: i64, const MAX: i64> Sum<&'__a BoundedI64<MIN, MAX>> for i64
Source§fn sum<I: Iterator<Item = &'__a BoundedI64<MIN, MAX>>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'__a BoundedI64<MIN, MAX>>>(iter: I) -> Self
Self
from the elements by “summing up”
the items.Source§impl<const MIN: i64, const MAX: i64> Sum<BoundedI64<MIN, MAX>> for i64
impl<const MIN: i64, const MAX: i64> Sum<BoundedI64<MIN, MAX>> for i64
Source§fn sum<I: Iterator<Item = BoundedI64<MIN, MAX>>>(iter: I) -> Self
fn sum<I: Iterator<Item = BoundedI64<MIN, MAX>>>(iter: I) -> Self
Self
from the elements by “summing up”
the items.Source§impl<const MIN: i64, const MAX: i64> ToPrimitive for BoundedI64<MIN, MAX>where
i64: ToPrimitive,
Available on crate feature num-traits02
only.
impl<const MIN: i64, const MAX: i64> ToPrimitive for BoundedI64<MIN, MAX>where
i64: ToPrimitive,
num-traits02
only.Source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
self
to an i64
. If the value cannot be
represented by an i64
, then None
is returned.Source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
self
to a u64
. If the value cannot be
represented by a u64
, then None
is returned.Source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
self
to an isize
. If the value cannot be
represented by an isize
, then None
is returned.Source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
self
to an i8
. If the value cannot be
represented by an i8
, then None
is returned.Source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
self
to an i16
. If the value cannot be
represented by an i16
, then None
is returned.Source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
self
to an i32
. If the value cannot be
represented by an i32
, then None
is returned.Source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
self
to an i128
. If the value cannot be
represented by an i128
(i64
under the default implementation), then
None
is returned. Read moreSource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
self
to a usize
. If the value cannot be
represented by a usize
, then None
is returned.Source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
self
to a u8
. If the value cannot be
represented by a u8
, then None
is returned.Source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
self
to a u16
. If the value cannot be
represented by a u16
, then None
is returned.Source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
self
to a u32
. If the value cannot be
represented by a u32
, then None
is returned.Source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
self
to a u128
. If the value cannot be
represented by a u128
(u64
under the default implementation), then
None
is returned. Read moreSource§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i16
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i16
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i32
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i32
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i8
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for i8
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for isize
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for isize
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u128
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u128
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u16
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u16
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u32
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u32
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u64
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u64
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u8
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for u8
Source§type Error = TryFromIntError
type Error = TryFromIntError
Source§impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for usize
impl<const MIN: i64, const MAX: i64> TryFrom<BoundedI64<MIN, MAX>> for usize
Source§type Error = TryFromIntError
type Error = TryFromIntError
impl<const MIN: i64, const MAX: i64> Copy for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Eq for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> Immutable for BoundedI64<MIN, MAX>
impl<const MIN: i64, const MAX: i64> NoUninit for BoundedI64<MIN, MAX>where
Self: 'static,
bytemuck1
only.