Struct llm_weaver::BoundedU8
source · pub struct BoundedU8<const MIN: u8, const MAX: u8>(/* private fields */);
Expand description
An
u8
constrained to be in the range MIN..=MAX
.
Implementations§
source§impl<const MIN: u8, const MAX: u8> Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> Bounded<MIN, MAX>
sourcepub const unsafe fn new_unchecked(n: u8) -> Bounded<MIN, MAX>
pub const unsafe fn new_unchecked(n: u8) -> Bounded<MIN, MAX>
sourcepub unsafe fn new_ref_unchecked(n: &u8) -> &Bounded<MIN, MAX>
pub unsafe fn new_ref_unchecked(n: &u8) -> &Bounded<MIN, MAX>
sourcepub unsafe fn new_mut_unchecked(n: &mut u8) -> &mut Bounded<MIN, MAX>
pub unsafe fn new_mut_unchecked(n: &mut u8) -> &mut Bounded<MIN, MAX>
sourcepub const fn in_range(n: u8) -> bool
pub const fn in_range(n: u8) -> bool
Checks whether the given value is in the range of the bounded integer.
sourcepub const fn new_saturating(n: u8) -> Bounded<MIN, MAX>
pub const fn new_saturating(n: u8) -> Bounded<MIN, MAX>
sourcepub fn from_str_radix(
src: &str,
radix: u32
) -> Result<Bounded<MIN, MAX>, ParseError>
pub fn from_str_radix( src: &str, radix: u32 ) -> Result<Bounded<MIN, MAX>, 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) -> &u8
pub const fn get_ref(&self) -> &u8
Returns a shared reference to the value of the bounded integer.
sourcepub unsafe fn get_mut(&mut self) -> &mut u8
pub unsafe fn get_mut(&mut self) -> &mut u8
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) -> Bounded<MIN, MAX>
pub fn pow(self, exp: u32) -> Bounded<MIN, MAX>
Raises self
to the power of exp
, using exponentiation by squaring. Panics if it
is out of range.
sourcepub fn div_euclid(self, rhs: u8) -> Bounded<MIN, MAX>
pub fn div_euclid(self, rhs: u8) -> Bounded<MIN, MAX>
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: u8) -> Bounded<MIN, MAX>
pub fn rem_euclid(self, rhs: u8) -> Bounded<MIN, MAX>
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: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_add(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked integer addition.
sourcepub const fn saturating_add(self, rhs: u8) -> Bounded<MIN, MAX>
pub const fn saturating_add(self, rhs: u8) -> Bounded<MIN, MAX>
Saturating integer addition.
sourcepub const fn checked_sub(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_sub(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked integer subtraction.
sourcepub const fn saturating_sub(self, rhs: u8) -> Bounded<MIN, MAX>
pub const fn saturating_sub(self, rhs: u8) -> Bounded<MIN, MAX>
Saturating integer subtraction.
sourcepub const fn checked_mul(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_mul(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked integer multiplication.
sourcepub const fn saturating_mul(self, rhs: u8) -> Bounded<MIN, MAX>
pub const fn saturating_mul(self, rhs: u8) -> Bounded<MIN, MAX>
Saturating integer multiplication.
sourcepub const fn checked_div(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_div(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked integer division.
sourcepub const fn checked_div_euclid(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_div_euclid(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked Euclidean division.
sourcepub const fn checked_rem(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_rem(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked integer remainder.
sourcepub const fn checked_rem_euclid(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
pub const fn checked_rem_euclid(self, rhs: u8) -> Option<Bounded<MIN, MAX>>
Checked Euclidean remainder.
sourcepub const fn checked_neg(self) -> Option<Bounded<MIN, MAX>>
pub const fn checked_neg(self) -> Option<Bounded<MIN, MAX>>
Checked negation.
sourcepub const fn checked_pow(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
pub const fn checked_pow(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
Checked exponentiation.
sourcepub const fn saturating_pow(self, rhs: u32) -> Bounded<MIN, MAX>
pub const fn saturating_pow(self, rhs: u32) -> Bounded<MIN, MAX>
Saturating exponentiation.
sourcepub const fn checked_shl(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
pub const fn checked_shl(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
Checked shift left.
sourcepub const fn checked_shr(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
pub const fn checked_shr(self, rhs: u32) -> Option<Bounded<MIN, MAX>>
Checked shift right.
Trait Implementations§
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Add<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> AddAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> AddAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> AddAssign<&u8> for Bounded<MIN, MAX>
source§fn add_assign(&mut self, rhs: &u8)
fn add_assign(&mut self, rhs: &u8)
+=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> AddAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> AddAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> AddAssign<u8> for Bounded<MIN, MAX>
source§fn add_assign(&mut self, rhs: u8)
fn add_assign(&mut self, rhs: u8)
+=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAnd<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAndAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitAndAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitAndAssign<&u8> for Bounded<MIN, MAX>
source§fn bitand_assign(&mut self, rhs: &u8)
fn bitand_assign(&mut self, rhs: &u8)
&=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitAndAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitAndAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitAndAssign<u8> for Bounded<MIN, MAX>
source§fn bitand_assign(&mut self, rhs: u8)
fn bitand_assign(&mut self, rhs: u8)
&=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitOrAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitOrAssign<&u8> for Bounded<MIN, MAX>
source§fn bitor_assign(&mut self, rhs: &u8)
fn bitor_assign(&mut self, rhs: &u8)
|=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitOrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitOrAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitOrAssign<u8> for Bounded<MIN, MAX>
source§fn bitor_assign(&mut self, rhs: u8)
fn bitor_assign(&mut self, rhs: u8)
|=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXor<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXorAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitXorAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitXorAssign<&u8> for Bounded<MIN, MAX>
source§fn bitxor_assign(&mut self, rhs: &u8)
fn bitxor_assign(&mut self, rhs: &u8)
^=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> BitXorAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> BitXorAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> BitXorAssign<u8> for Bounded<MIN, MAX>
source§fn bitxor_assign(&mut self, rhs: u8)
fn bitxor_assign(&mut self, rhs: u8)
^=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Div<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> DivAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> DivAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> DivAssign<&u8> for Bounded<MIN, MAX>
source§fn div_assign(&mut self, rhs: &u8)
fn div_assign(&mut self, rhs: &u8)
/=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> DivAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> DivAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> DivAssign<u8> for Bounded<MIN, MAX>
source§fn div_assign(&mut self, rhs: u8)
fn div_assign(&mut self, rhs: u8)
/=
operation. Read moresource§impl<const MIN: u8, const MAX: u8> FromPrimitive for Bounded<MIN, MAX>where
u8: FromPrimitive,
impl<const MIN: u8, const MAX: u8> FromPrimitive for Bounded<MIN, MAX>where
u8: FromPrimitive,
source§fn from_i64(n: i64) -> Option<Bounded<MIN, MAX>>
fn from_i64(n: i64) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_u64(n: u64) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_isize(n: isize) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_i8(n: i8) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_i16(n: i16) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_i32(n: i32) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_i128(n: i128) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_usize(n: usize) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_u8(n: u8) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_u16(n: u16) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_u32(n: u32) -> Option<Bounded<MIN, MAX>>
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<Bounded<MIN, MAX>>
fn from_u128(n: u128) -> Option<Bounded<MIN, MAX>>
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: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Mul<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> MulAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> MulAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> MulAssign<&u8> for Bounded<MIN, MAX>
source§fn mul_assign(&mut self, rhs: &u8)
fn mul_assign(&mut self, rhs: &u8)
*=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> MulAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> MulAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> MulAssign<u8> for Bounded<MIN, MAX>
source§fn mul_assign(&mut self, rhs: u8)
fn mul_assign(&mut self, rhs: u8)
*=
operation. Read moresource§impl<const MIN: u8, const MAX: u8> Ord for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> 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: u8, const A_MAX: u8, const B_MIN: u8, const B_MAX: u8> PartialEq<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
impl<const A_MIN: u8, const A_MAX: u8, const B_MIN: u8, const B_MAX: u8> PartialEq<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
source§impl<const A_MIN: u8, const A_MAX: u8, const B_MIN: u8, const B_MAX: u8> PartialOrd<Bounded<B_MIN, B_MAX>> for Bounded<A_MIN, A_MAX>
impl<const A_MIN: u8, const A_MAX: u8, const B_MIN: u8, const B_MAX: u8> 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: u8, const MAX: u8> PartialOrd<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> PartialOrd<u8> 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<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Rem<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> RemAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> RemAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> RemAssign<&u8> for Bounded<MIN, MAX>
source§fn rem_assign(&mut self, rhs: &u8)
fn rem_assign(&mut self, rhs: &u8)
%=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> RemAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> RemAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> RemAssign<u8> for Bounded<MIN, MAX>
source§fn rem_assign(&mut self, rhs: u8)
fn rem_assign(&mut self, rhs: u8)
%=
operation. Read moresource§impl<const MIN: u8, const MAX: u8> SaturatingAdd for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> SaturatingAdd for Bounded<MIN, MAX>
source§fn saturating_add(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
fn saturating_add(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
self + other
, saturating at the relevant high or low boundary of
the type.source§impl<const MIN: u8, const MAX: u8> SaturatingMul for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> SaturatingMul for Bounded<MIN, MAX>
source§fn saturating_mul(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
fn saturating_mul(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
self * other
, saturating at the relevant high or low boundary of
the type.source§impl<const MIN: u8, const MAX: u8> SaturatingSub for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> SaturatingSub for Bounded<MIN, MAX>
source§fn saturating_sub(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
fn saturating_sub(&self, v: &Bounded<MIN, MAX>) -> Bounded<MIN, MAX>
self - other
, saturating at the relevant high or low boundary of
the type.source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shl<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> ShlAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> ShlAssign<&u32> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> 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: u8, const MAX: u8> ShlAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> ShlAssign<&u8> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: &u8)
fn shl_assign(&mut self, rhs: &u8)
<<=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> ShlAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> ShlAssign<u32> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> 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: u8, const MAX: u8> ShlAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> ShlAssign<u8> for Bounded<MIN, MAX>
source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
<<=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Shr<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> ShrAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> ShrAssign<&u32> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> 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: u8, const MAX: u8> ShrAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> ShrAssign<&u8> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: &u8)
fn shr_assign(&mut self, rhs: &u8)
>>=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> ShrAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> ShrAssign<u32> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> 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: u8, const MAX: u8> ShrAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> ShrAssign<u8> for Bounded<MIN, MAX>
source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
>>=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<&Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<Bounded<R_MIN, R_MAX>> for &Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> Sub<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
source§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> SubAssign<&Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> SubAssign<&u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> SubAssign<&u8> for Bounded<MIN, MAX>
source§fn sub_assign(&mut self, rhs: &u8)
fn sub_assign(&mut self, rhs: &u8)
-=
operation. Read moresource§impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> SubAssign<Bounded<R_MIN, R_MAX>> for Bounded<L_MIN, L_MAX>
impl<const L_MIN: u8, const L_MAX: u8, const R_MIN: u8, const R_MAX: u8> 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: u8, const MAX: u8> SubAssign<u8> for Bounded<MIN, MAX>
impl<const MIN: u8, const MAX: u8> SubAssign<u8> for Bounded<MIN, MAX>
source§fn sub_assign(&mut self, rhs: u8)
fn sub_assign(&mut self, rhs: u8)
-=
operation. Read moresource§impl<const MIN: u8, const MAX: u8> ToPrimitive for Bounded<MIN, MAX>where
u8: ToPrimitive,
impl<const MIN: u8, const MAX: u8> ToPrimitive for Bounded<MIN, MAX>where
u8: ToPrimitive,
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