Struct bounded_integer::BoundedIsize
source · #[repr(transparent)]pub struct BoundedIsize<const MIN: isize, const MAX: isize>(_);
types
only.Expand description
An
isize
constrained to be in the range MIN..=MAX
.
Implementations§
source§impl<const MIN: isize, const MAX: isize> Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> Bounded<MIN, MAX>
sourcepub const unsafe fn new_unchecked(n: isize) -> Self
pub const unsafe fn new_unchecked(n: isize) -> Self
sourcepub unsafe fn new_ref_unchecked(n: &isize) -> &Self
pub unsafe fn new_ref_unchecked(n: &isize) -> &Self
sourcepub unsafe fn new_mut_unchecked(n: &mut isize) -> &mut Self
pub unsafe fn new_mut_unchecked(n: &mut isize) -> &mut Self
sourcepub const fn in_range(n: isize) -> bool
pub const fn in_range(n: isize) -> bool
Checks whether the given value is in the range of the bounded integer.
sourcepub const fn new_saturating(n: isize) -> Self
pub const fn new_saturating(n: isize) -> Self
sourcepub fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseError>
pub 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) -> &isize
pub const fn get_ref(&self) -> &isize
Returns a shared reference to the value of the bounded integer.
sourcepub unsafe fn get_mut(&mut self) -> &mut isize
pub unsafe fn get_mut(&mut self) -> &mut isize
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 fn pow(self, exp: u32) -> Self
pub 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 fn div_euclid(self, rhs: isize) -> Self
pub fn div_euclid(self, rhs: isize) -> Self
Calculates the quotient of Euclidean division of self
by rhs
. Panics if rhs
is 0 or the result is out of range.
sourcepub fn rem_euclid(self, rhs: isize) -> Self
pub fn rem_euclid(self, rhs: isize) -> 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: isize) -> Option<Self>
pub const fn checked_add(self, rhs: isize) -> Option<Self>
Checked integer addition.
sourcepub const fn saturating_add(self, rhs: isize) -> Self
pub const fn saturating_add(self, rhs: isize) -> Self
Saturating integer addition.
sourcepub const fn checked_sub(self, rhs: isize) -> Option<Self>
pub const fn checked_sub(self, rhs: isize) -> Option<Self>
Checked integer subtraction.
sourcepub const fn saturating_sub(self, rhs: isize) -> Self
pub const fn saturating_sub(self, rhs: isize) -> Self
Saturating integer subtraction.
sourcepub const fn checked_mul(self, rhs: isize) -> Option<Self>
pub const fn checked_mul(self, rhs: isize) -> Option<Self>
Checked integer multiplication.
sourcepub const fn saturating_mul(self, rhs: isize) -> Self
pub const fn saturating_mul(self, rhs: isize) -> Self
Saturating integer multiplication.
sourcepub const fn checked_div(self, rhs: isize) -> Option<Self>
pub const fn checked_div(self, rhs: isize) -> Option<Self>
Checked integer division.
sourcepub const fn checked_div_euclid(self, rhs: isize) -> Option<Self>
pub const fn checked_div_euclid(self, rhs: isize) -> Option<Self>
Checked Euclidean division.
sourcepub const fn checked_rem(self, rhs: isize) -> Option<Self>
pub const fn checked_rem(self, rhs: isize) -> Option<Self>
Checked integer remainder.
sourcepub const fn checked_rem_euclid(self, rhs: isize) -> Option<Self>
pub const fn checked_rem_euclid(self, rhs: isize) -> Option<Self>
Checked Euclidean remainder.
sourcepub const fn checked_neg(self) -> Option<Self>
pub const fn checked_neg(self) -> Option<Self>
Checked negation.
sourcepub const fn saturating_neg(self) -> Self
pub const fn saturating_neg(self) -> Self
Saturating 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 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 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 L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Add<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> AddAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> AddAssign<&Bounded<MIN, MAX>> for isize
source§fn add_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn add_assign(&mut self, rhs: &Bounded<MIN, MAX>)
+=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> AddAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> AddAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn add_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn add_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
+=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> AddAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> AddAssign<&isize> for Bounded<MIN, MAX>
source§fn add_assign(&mut self, rhs: &isize)
fn add_assign(&mut self, rhs: &isize)
+=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> AddAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> AddAssign<Bounded<MIN, MAX>> for isize
source§fn add_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn add_assign(&mut self, rhs: Bounded<MIN, MAX>)
+=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> AddAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> AddAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn add_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn add_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
+=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> AddAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> AddAssign<isize> for Bounded<MIN, MAX>
source§fn add_assign(&mut self, rhs: isize)
fn add_assign(&mut self, rhs: isize)
+=
operation. Read moresource§impl<'a, const MIN: isize, const MAX: isize> Arbitrary<'a> for Bounded<MIN, MAX>
Available on crate feature arbitrary1
only.
impl<'a, const MIN: isize, const MAX: isize> Arbitrary<'a> for Bounded<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§impl<T, const MIN: isize, const MAX: isize> AsPrimitive<T> for Bounded<MIN, MAX>where
isize: AsPrimitive<T>,
T: 'static + Copy,
Available on crate feature num-traits02
only.
impl<T, const MIN: isize, const MAX: isize> AsPrimitive<T> for Bounded<MIN, MAX>where isize: AsPrimitive<T>, T: 'static + Copy,
num-traits02
only.source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAnd<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> BitAndAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitAndAssign<&Bounded<MIN, MAX>> for isize
source§fn bitand_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn bitand_assign(&mut self, rhs: &Bounded<MIN, MAX>)
&=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAndAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAndAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitand_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn bitand_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
&=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitAndAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitAndAssign<&isize> for Bounded<MIN, MAX>
source§fn bitand_assign(&mut self, rhs: &isize)
fn bitand_assign(&mut self, rhs: &isize)
&=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitAndAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitAndAssign<Bounded<MIN, MAX>> for isize
source§fn bitand_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn bitand_assign(&mut self, rhs: Bounded<MIN, MAX>)
&=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAndAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitAndAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitand_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn bitand_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
&=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitAndAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitAndAssign<isize> for Bounded<MIN, MAX>
source§fn bitand_assign(&mut self, rhs: isize)
fn bitand_assign(&mut self, rhs: isize)
&=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> BitOrAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitOrAssign<&Bounded<MIN, MAX>> for isize
source§fn bitor_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn bitor_assign(&mut self, rhs: &Bounded<MIN, MAX>)
|=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitor_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn bitor_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
|=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitOrAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitOrAssign<&isize> for Bounded<MIN, MAX>
source§fn bitor_assign(&mut self, rhs: &isize)
fn bitor_assign(&mut self, rhs: &isize)
|=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitOrAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitOrAssign<Bounded<MIN, MAX>> for isize
source§fn bitor_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn bitor_assign(&mut self, rhs: Bounded<MIN, MAX>)
|=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitOrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitor_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn bitor_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
|=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitOrAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitOrAssign<isize> for Bounded<MIN, MAX>
source§fn bitor_assign(&mut self, rhs: isize)
fn bitor_assign(&mut self, rhs: isize)
|=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXor<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> BitXorAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitXorAssign<&Bounded<MIN, MAX>> for isize
source§fn bitxor_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: &Bounded<MIN, MAX>)
^=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXorAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXorAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitxor_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn bitxor_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
^=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitXorAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitXorAssign<&isize> for Bounded<MIN, MAX>
source§fn bitxor_assign(&mut self, rhs: &isize)
fn bitxor_assign(&mut self, rhs: &isize)
^=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitXorAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> BitXorAssign<Bounded<MIN, MAX>> for isize
source§fn bitxor_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn bitxor_assign(&mut self, rhs: Bounded<MIN, MAX>)
^=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXorAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> BitXorAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn bitxor_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn bitxor_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
^=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> BitXorAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> BitXorAssign<isize> for Bounded<MIN, MAX>
source§fn bitxor_assign(&mut self, rhs: isize)
fn bitxor_assign(&mut self, rhs: isize)
^=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> Bounded for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> Bounded for Bounded<MIN, MAX>
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> CheckedAdd for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedAdd for Bounded<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: isize, const MAX: isize> CheckedDiv for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedDiv for Bounded<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: isize, const MAX: isize> CheckedMul for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedMul for Bounded<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: isize, const MAX: isize> CheckedNeg for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedNeg for Bounded<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: isize, const MAX: isize> CheckedRem for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedRem for Bounded<MIN, MAX>
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> CheckedShl for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedShl for Bounded<MIN, MAX>
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> CheckedShr for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedShr for Bounded<MIN, MAX>
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> CheckedSub for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> CheckedSub for Bounded<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: isize, const MAX: isize> Contiguous for Bounded<MIN, MAX>
Available on crate feature bytemuck1
only.
impl<const MIN: isize, const MAX: isize> Contiguous for Bounded<MIN, MAX>
bytemuck1
only.§type Int = isize
type Int = isize
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: isize, const MAX: isize> Deserialize<'de> for Bounded<MIN, MAX>
Available on crate feature serde1
only.
impl<'de, const MIN: isize, const MAX: isize> Deserialize<'de> for Bounded<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 L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Div<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> DivAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> DivAssign<&Bounded<MIN, MAX>> for isize
source§fn div_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn div_assign(&mut self, rhs: &Bounded<MIN, MAX>)
/=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> DivAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> DivAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn div_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn div_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
/=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> DivAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> DivAssign<&isize> for Bounded<MIN, MAX>
source§fn div_assign(&mut self, rhs: &isize)
fn div_assign(&mut self, rhs: &isize)
/=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> DivAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> DivAssign<Bounded<MIN, MAX>> for isize
source§fn div_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn div_assign(&mut self, rhs: Bounded<MIN, MAX>)
/=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> DivAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> DivAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn div_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn div_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
/=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> DivAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> DivAssign<isize> for Bounded<MIN, MAX>
source§fn div_assign(&mut self, rhs: isize)
fn div_assign(&mut self, rhs: isize)
/=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> FromPrimitive for Bounded<MIN, MAX>where
isize: FromPrimitive,
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> FromPrimitive for Bounded<MIN, MAX>where isize: 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 L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Mul<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<A, B, const MIN: isize, const MAX: isize> MulAdd<A, B> for Bounded<MIN, MAX>where
isize: MulAdd<A, B, Output = isize>,
Available on crate feature num-traits02
only.
impl<A, B, const MIN: isize, const MAX: isize> MulAdd<A, B> for Bounded<MIN, MAX>where isize: MulAdd<A, B, Output = isize>,
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> MulAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> MulAssign<&Bounded<MIN, MAX>> for isize
source§fn mul_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn mul_assign(&mut self, rhs: &Bounded<MIN, MAX>)
*=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> MulAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> MulAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn mul_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn mul_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
*=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> MulAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> MulAssign<&isize> for Bounded<MIN, MAX>
source§fn mul_assign(&mut self, rhs: &isize)
fn mul_assign(&mut self, rhs: &isize)
*=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> MulAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> MulAssign<Bounded<MIN, MAX>> for isize
source§fn mul_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn mul_assign(&mut self, rhs: Bounded<MIN, MAX>)
*=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> MulAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> MulAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn mul_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn mul_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
*=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> MulAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> MulAssign<isize> for Bounded<MIN, MAX>
source§fn mul_assign(&mut self, rhs: isize)
fn mul_assign(&mut self, rhs: isize)
*=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> NumCast for Bounded<MIN, MAX>where
isize: NumCast,
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> NumCast for Bounded<MIN, MAX>where isize: NumCast,
num-traits02
only.source§impl<const MIN: isize, const MAX: isize> Ord for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> Ord for Bounded<MIN, MAX>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<const A_MIN: isize, const A_MAX: isize, const B_MIN: isize, const B_MAX: isize> PartialEq<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
impl<const A_MIN: isize, const A_MAX: isize, const B_MIN: isize, const B_MAX: isize> PartialEq<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
source§impl<const MIN: isize, const MAX: isize> PartialEq<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> PartialEq<Bounded<MIN, MAX>> for isize
source§impl<const MIN: isize, const MAX: isize> PartialEq<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> PartialEq<isize> for Bounded<MIN, MAX>
source§impl<const A_MIN: isize, const A_MAX: isize, const B_MIN: isize, const B_MAX: isize> PartialOrd<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
impl<const A_MIN: isize, const A_MAX: isize, const B_MIN: isize, const B_MAX: isize> PartialOrd<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<const MIN: isize, const MAX: isize> PartialOrd<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> PartialOrd<Bounded<MIN, MAX>> for isize
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<const MIN: isize, const MAX: isize> PartialOrd<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> PartialOrd<isize> for Bounded<MIN, MAX>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, const MIN: isize, const MAX: isize> Product<&'a Bounded<MIN, MAX>> for Bounded<MIN, MAX>
impl<'a, const MIN: isize, const MAX: isize> Product<&'a Bounded<MIN, MAX>> for Bounded<MIN, MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Rem<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> RemAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> RemAssign<&Bounded<MIN, MAX>> for isize
source§fn rem_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn rem_assign(&mut self, rhs: &Bounded<MIN, MAX>)
%=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> RemAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> RemAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn rem_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn rem_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
%=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> RemAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> RemAssign<&isize> for Bounded<MIN, MAX>
source§fn rem_assign(&mut self, rhs: &isize)
fn rem_assign(&mut self, rhs: &isize)
%=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> RemAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> RemAssign<Bounded<MIN, MAX>> for isize
source§fn rem_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn rem_assign(&mut self, rhs: Bounded<MIN, MAX>)
%=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> RemAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> RemAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn rem_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn rem_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
%=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> RemAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> RemAssign<isize> for Bounded<MIN, MAX>
source§fn rem_assign(&mut self, rhs: isize)
fn rem_assign(&mut self, rhs: isize)
%=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> SaturatingAdd for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> SaturatingAdd for Bounded<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: isize, const MAX: isize> SaturatingMul for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> SaturatingMul for Bounded<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: isize, const MAX: isize> SaturatingSub for Bounded<MIN, MAX>
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> SaturatingSub for Bounded<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: isize, const MAX: isize> Serialize for Bounded<MIN, MAX>
Available on crate feature serde1
only.
impl<const MIN: isize, const MAX: isize> Serialize for Bounded<MIN, MAX>
serde1
only.source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shl<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> ShlAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> ShlAssign<&Bounded<MIN, MAX>> for isize
source§fn shl_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn shl_assign(&mut self, rhs: &Bounded<MIN, MAX>)
<<=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShlAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShlAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn shl_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn shl_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
<<=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShlAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShlAssign<&isize> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: &isize)
fn shl_assign(&mut self, rhs: &isize)
<<=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShlAssign<&u32> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShlAssign<&u32> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: &u32)
fn shl_assign(&mut self, rhs: &u32)
<<=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShlAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> ShlAssign<Bounded<MIN, MAX>> for isize
source§fn shl_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn shl_assign(&mut self, rhs: Bounded<MIN, MAX>)
<<=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShlAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShlAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn shl_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn shl_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
<<=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShlAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShlAssign<isize> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: isize)
fn shl_assign(&mut self, rhs: isize)
<<=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShlAssign<u32> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShlAssign<u32> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
<<=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Shr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> ShrAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> ShrAssign<&Bounded<MIN, MAX>> for isize
source§fn shr_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn shr_assign(&mut self, rhs: &Bounded<MIN, MAX>)
>>=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn shr_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn shr_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShrAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShrAssign<&isize> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: &isize)
fn shr_assign(&mut self, rhs: &isize)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShrAssign<&u32> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShrAssign<&u32> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: &u32)
fn shr_assign(&mut self, rhs: &u32)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShrAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> ShrAssign<Bounded<MIN, MAX>> for isize
source§fn shr_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn shr_assign(&mut self, rhs: Bounded<MIN, MAX>)
>>=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> ShrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn shr_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn shr_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShrAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShrAssign<isize> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: isize)
fn shr_assign(&mut self, rhs: isize)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> ShrAssign<u32> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> ShrAssign<u32> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
>>=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> Step for Bounded<MIN, MAX>
Available on crate feature step_trait
only.
impl<const MIN: isize, const MAX: isize> Step for Bounded<MIN, MAX>
step_trait
only.source§fn steps_between(start: &Self, end: &Self) -> Option<usize>
fn steps_between(start: &Self, end: &Self) -> Option<usize>
step_trait
)source§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 L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> Sub<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const MIN: isize, const MAX: isize> SubAssign<&Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> SubAssign<&Bounded<MIN, MAX>> for isize
source§fn sub_assign(&mut self, rhs: &Bounded<MIN, MAX>)
fn sub_assign(&mut self, rhs: &Bounded<MIN, MAX>)
-=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> SubAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> SubAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn sub_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
fn sub_assign(&mut self, rhs: &Bounded<R_MIN, R_MAX>)
-=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> SubAssign<&isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> SubAssign<&isize> for Bounded<MIN, MAX>
source§fn sub_assign(&mut self, rhs: &isize)
fn sub_assign(&mut self, rhs: &isize)
-=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> SubAssign<Bounded<MIN, MAX>> for isize
impl<const MIN: isize, const MAX: isize> SubAssign<Bounded<MIN, MAX>> for isize
source§fn sub_assign(&mut self, rhs: Bounded<MIN, MAX>)
fn sub_assign(&mut self, rhs: Bounded<MIN, MAX>)
-=
operation. Read moresource§impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> SubAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: isize, const L_MAX: isize, const R_MIN: isize, const R_MAX: isize> SubAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§fn sub_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
fn sub_assign(&mut self, rhs: Bounded<R_MIN, R_MAX>)
-=
operation. Read moresource§impl<const MIN: isize, const MAX: isize> SubAssign<isize> for Bounded<MIN, MAX>
impl<const MIN: isize, const MAX: isize> SubAssign<isize> for Bounded<MIN, MAX>
source§fn sub_assign(&mut self, rhs: isize)
fn sub_assign(&mut self, rhs: isize)
-=
operation. Read moresource§impl<'a, const MIN: isize, const MAX: isize> Sum<&'a Bounded<MIN, MAX>> for Bounded<MIN, MAX>
impl<'a, const MIN: isize, const MAX: isize> Sum<&'a Bounded<MIN, MAX>> for Bounded<MIN, MAX>
source§impl<const MIN: isize, const MAX: isize> ToPrimitive for Bounded<MIN, MAX>where
isize: ToPrimitive,
Available on crate feature num-traits02
only.
impl<const MIN: isize, const MAX: isize> ToPrimitive for Bounded<MIN, MAX>where isize: 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 more