#[repr(C, align(4))]pub struct PositiveI32 { /* private fields */ }Implementations§
Source§impl PositiveI32
impl PositiveI32
pub const BITS: u32 = 32u32
pub const MIN: Self = _
pub const MAX: Self = _
pub const fn new(value: i32) -> Option<Self>
pub const unsafe fn new_unchecked(value: i32) -> Self
pub const fn get(self) -> i32
pub const fn count_zeros(self) -> u32
pub const fn count_ones(self) -> u32
pub const fn leading_zeros(self) -> u32
pub const fn trailing_zeros(self) -> u32
pub const fn is_power_of_two(self) -> bool
pub const fn ilog2(self) -> u32
pub const fn ilog10(self) -> u32
pub const fn checked_neg(self) -> Option<NegativeI32>
pub const fn checked_add(self, other: Self) -> Option<Self>
pub const fn checked_sub(self, other: Self) -> Option<Self>
pub const fn checked_mul(self, other: Self) -> Option<Self>
pub const fn checked_div(self, other: Self) -> Option<Self>
pub const fn checked_rem(self, other: Self) -> Option<Self>
pub const fn checked_div_unsigned(self, other: u32) -> Option<Self>
pub const fn checked_rem_unsigned(self, other: u32) -> Option<Self>
pub const fn checked_pow(self, other: u32) -> Option<Self>
pub const fn checked_next_power_of_two(self) -> Option<Self>
pub const fn checked_ilog2(self) -> Option<u32>
pub const fn checked_ilog10(self) -> Option<u32>
pub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
pub const fn saturating_mul(self, other: Self) -> Self
pub const fn saturating_pow(self, other: u32) -> Self
Trait Implementations§
Source§impl Binary for PositiveI32
impl Binary for PositiveI32
Source§impl BitAnd<NegativeI32> for PositiveI32
impl BitAnd<NegativeI32> for PositiveI32
Source§type Output = PositiveI32
type Output = PositiveI32
The resulting type after applying the
& operator.Source§impl BitAnd<PositiveI32> for NegativeI32
impl BitAnd<PositiveI32> for NegativeI32
Source§type Output = PositiveI32
type Output = PositiveI32
The resulting type after applying the
& operator.Source§impl BitAnd<PositiveI32> for i32
impl BitAnd<PositiveI32> for i32
Source§type Output = PositiveI32
type Output = PositiveI32
The resulting type after applying the
& operator.Source§impl BitAnd<i32> for PositiveI32
impl BitAnd<i32> for PositiveI32
Source§impl BitAnd for PositiveI32
impl BitAnd for PositiveI32
Source§impl BitAndAssign<NegativeI32> for PositiveI32
impl BitAndAssign<NegativeI32> for PositiveI32
Source§fn bitand_assign(&mut self, rhs: NegativeI32)
fn bitand_assign(&mut self, rhs: NegativeI32)
Performs the
&= operation. Read moreSource§impl BitAndAssign<i32> for PositiveI32
impl BitAndAssign<i32> for PositiveI32
Source§fn bitand_assign(&mut self, rhs: i32)
fn bitand_assign(&mut self, rhs: i32)
Performs the
&= operation. Read moreSource§impl BitAndAssign for PositiveI32
impl BitAndAssign for PositiveI32
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOr<NegativeI32> for PositiveI32
impl BitOr<NegativeI32> for PositiveI32
Source§type Output = NegativeI32
type Output = NegativeI32
The resulting type after applying the
| operator.Source§impl BitOr<PositiveI32> for NegativeI32
impl BitOr<PositiveI32> for NegativeI32
Source§type Output = NegativeI32
type Output = NegativeI32
The resulting type after applying the
| operator.Source§impl BitOr for PositiveI32
impl BitOr for PositiveI32
Source§impl BitOrAssign<PositiveI32> for NegativeI32
impl BitOrAssign<PositiveI32> for NegativeI32
Source§fn bitor_assign(&mut self, rhs: PositiveI32)
fn bitor_assign(&mut self, rhs: PositiveI32)
Performs the
|= operation. Read moreSource§impl BitOrAssign for PositiveI32
impl BitOrAssign for PositiveI32
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXor<NegativeI32> for PositiveI32
impl BitXor<NegativeI32> for PositiveI32
Source§type Output = NegativeI32
type Output = NegativeI32
The resulting type after applying the
^ operator.Source§impl BitXor<PositiveI32> for NegativeI32
impl BitXor<PositiveI32> for NegativeI32
Source§type Output = NegativeI32
type Output = NegativeI32
The resulting type after applying the
^ operator.Source§impl BitXor for PositiveI32
impl BitXor for PositiveI32
Source§impl BitXorAssign<PositiveI32> for NegativeI32
impl BitXorAssign<PositiveI32> for NegativeI32
Source§fn bitxor_assign(&mut self, rhs: PositiveI32)
fn bitxor_assign(&mut self, rhs: PositiveI32)
Performs the
^= operation. Read moreSource§impl BitXorAssign for PositiveI32
impl BitXorAssign for PositiveI32
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl Clone for PositiveI32
impl Clone for PositiveI32
Source§fn clone(&self) -> PositiveI32
fn clone(&self) -> PositiveI32
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PositiveI32
impl Debug for PositiveI32
Source§impl Default for PositiveI32
impl Default for PositiveI32
Source§impl Display for PositiveI32
impl Display for PositiveI32
Source§impl Div<u32> for PositiveI32
impl Div<u32> for PositiveI32
Source§impl Div for PositiveI32
impl Div for PositiveI32
Source§impl DivAssign<u32> for PositiveI32
impl DivAssign<u32> for PositiveI32
Source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/= operation. Read moreSource§impl DivAssign for PositiveI32
impl DivAssign for PositiveI32
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl From<PositiveI32> for i128
impl From<PositiveI32> for i128
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<PositiveI32> for i32
impl From<PositiveI32> for i32
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<PositiveI32> for i64
impl From<PositiveI32> for i64
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<PositiveI32> for u128
impl From<PositiveI32> for u128
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<PositiveI32> for u32
impl From<PositiveI32> for u32
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<PositiveI32> for u64
impl From<PositiveI32> for u64
Source§fn from(value: PositiveI32) -> Self
fn from(value: PositiveI32) -> Self
Converts to this type from the input type.
Source§impl From<u16> for PositiveI32
impl From<u16> for PositiveI32
Source§impl From<u8> for PositiveI32
impl From<u8> for PositiveI32
Source§impl FromStr for PositiveI32
impl FromStr for PositiveI32
Source§impl Hash for PositiveI32
impl Hash for PositiveI32
Source§impl LowerHex for PositiveI32
impl LowerHex for PositiveI32
Source§impl Not for PositiveI32
impl Not for PositiveI32
Source§impl Octal for PositiveI32
impl Octal for PositiveI32
Source§impl Ord for PositiveI32
impl Ord for PositiveI32
Source§impl PartialEq for PositiveI32
impl PartialEq for PositiveI32
Source§impl PartialOrd for PositiveI32
impl PartialOrd for PositiveI32
Source§impl Rem<u32> for PositiveI32
impl Rem<u32> for PositiveI32
Source§impl Rem for PositiveI32
impl Rem for PositiveI32
Source§impl RemAssign<u32> for PositiveI32
impl RemAssign<u32> for PositiveI32
Source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%= operation. Read moreSource§impl RemAssign for PositiveI32
impl RemAssign for PositiveI32
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl TryFrom<PositiveI32> for i16
impl TryFrom<PositiveI32> for i16
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<PositiveI32> for i8
impl TryFrom<PositiveI32> for i8
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<PositiveI32> for isize
impl TryFrom<PositiveI32> for isize
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<PositiveI32> for u16
impl TryFrom<PositiveI32> for u16
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<PositiveI32> for u8
impl TryFrom<PositiveI32> for u8
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<PositiveI32> for usize
impl TryFrom<PositiveI32> for usize
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<i128> for PositiveI32
impl TryFrom<i128> for PositiveI32
Source§impl TryFrom<i16> for PositiveI32
impl TryFrom<i16> for PositiveI32
Source§impl TryFrom<i32> for PositiveI32
impl TryFrom<i32> for PositiveI32
Source§impl TryFrom<i64> for PositiveI32
impl TryFrom<i64> for PositiveI32
Source§impl TryFrom<i8> for PositiveI32
impl TryFrom<i8> for PositiveI32
Source§impl TryFrom<isize> for PositiveI32
impl TryFrom<isize> for PositiveI32
Source§impl TryFrom<u128> for PositiveI32
impl TryFrom<u128> for PositiveI32
Source§impl TryFrom<u32> for PositiveI32
impl TryFrom<u32> for PositiveI32
Source§impl TryFrom<u64> for PositiveI32
impl TryFrom<u64> for PositiveI32
Source§impl TryFrom<usize> for PositiveI32
impl TryFrom<usize> for PositiveI32
Source§impl UpperHex for PositiveI32
impl UpperHex for PositiveI32
impl Copy for PositiveI32
impl Eq for PositiveI32
Auto Trait Implementations§
impl Freeze for PositiveI32
impl RefUnwindSafe for PositiveI32
impl Send for PositiveI32
impl Sync for PositiveI32
impl Unpin for PositiveI32
impl UnwindSafe for PositiveI32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more