Struct beetle_nonzero::NonZero
source · pub struct NonZero<T: PrimInt> { /* private fields */ }Expand description
A wrapper around a primitive non-zero integer like i32 or u32.
Implementations§
Trait Implementations§
source§impl<T: PrimInt + AddAssign> AddAssign<NonZero<T>> for NonZero<T>
impl<T: PrimInt + AddAssign> AddAssign<NonZero<T>> for NonZero<T>
source§fn add_assign(&mut self, rhs: NonZero<T>)
fn add_assign(&mut self, rhs: NonZero<T>)
Performs the
+= operation. Read moresource§impl<T: PrimInt + BitAndAssign> BitAndAssign<NonZero<T>> for NonZero<T>
impl<T: PrimInt + BitAndAssign> BitAndAssign<NonZero<T>> for NonZero<T>
source§fn bitand_assign(&mut self, rhs: NonZero<T>)
fn bitand_assign(&mut self, rhs: NonZero<T>)
Performs the
&= operation. Read moresource§impl<T: PrimInt + BitOrAssign> BitOrAssign<NonZero<T>> for NonZero<T>
impl<T: PrimInt + BitOrAssign> BitOrAssign<NonZero<T>> for NonZero<T>
source§fn bitor_assign(&mut self, rhs: NonZero<T>)
fn bitor_assign(&mut self, rhs: NonZero<T>)
Performs the
|= operation. Read moresource§impl<T: PrimInt + BitXorAssign> BitXorAssign<NonZero<T>> for NonZero<T>
impl<T: PrimInt + BitXorAssign> BitXorAssign<NonZero<T>> for NonZero<T>
source§fn bitxor_assign(&mut self, rhs: NonZero<T>)
fn bitxor_assign(&mut self, rhs: NonZero<T>)
Performs the
^= operation. Read moresource§impl<T, __RhsT> DivAssign<__RhsT> for NonZero<T>where
T: DivAssign<__RhsT> + PrimInt,
impl<T, __RhsT> DivAssign<__RhsT> for NonZero<T>where T: DivAssign<__RhsT> + PrimInt,
source§fn div_assign(&mut self, rhs: __RhsT)
fn div_assign(&mut self, rhs: __RhsT)
Performs the
/= operation. Read moresource§impl<T, __RhsT> MulAssign<__RhsT> for NonZero<T>where
T: MulAssign<__RhsT> + PrimInt,
impl<T, __RhsT> MulAssign<__RhsT> for NonZero<T>where T: MulAssign<__RhsT> + PrimInt,
source§fn mul_assign(&mut self, rhs: __RhsT)
fn mul_assign(&mut self, rhs: __RhsT)
Performs the
*= operation. Read moresource§impl<T: Ord + PrimInt> Ord for NonZero<T>
impl<T: Ord + PrimInt> Ord for NonZero<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq + PrimInt> PartialEq<NonZero<T>> for NonZero<T>
impl<T: PartialEq + PrimInt> PartialEq<NonZero<T>> for NonZero<T>
source§impl<T: PartialOrd + PrimInt> PartialOrd<NonZero<T>> for NonZero<T>
impl<T: PartialOrd + PrimInt> PartialOrd<NonZero<T>> for NonZero<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<T, __RhsT> ShlAssign<__RhsT> for NonZero<T>where
T: ShlAssign<__RhsT> + PrimInt,
impl<T, __RhsT> ShlAssign<__RhsT> for NonZero<T>where T: ShlAssign<__RhsT> + PrimInt,
source§fn shl_assign(&mut self, rhs: __RhsT)
fn shl_assign(&mut self, rhs: __RhsT)
Performs the
<<= operation. Read moresource§impl<T, __RhsT> ShrAssign<__RhsT> for NonZero<T>where
T: ShrAssign<__RhsT> + PrimInt,
impl<T, __RhsT> ShrAssign<__RhsT> for NonZero<T>where T: ShrAssign<__RhsT> + PrimInt,
source§fn shr_assign(&mut self, rhs: __RhsT)
fn shr_assign(&mut self, rhs: __RhsT)
Performs the
>>= operation. Read moresource§impl<T: PrimInt + SubAssign> SubAssign<NonZero<T>> for NonZero<T>
impl<T: PrimInt + SubAssign> SubAssign<NonZero<T>> for NonZero<T>
source§fn sub_assign(&mut self, rhs: NonZero<T>)
fn sub_assign(&mut self, rhs: NonZero<T>)
Performs the
-= operation. Read moreimpl<T: Copy + PrimInt> Copy for NonZero<T>
impl<T: Eq + PrimInt> Eq for NonZero<T>
impl<T: PrimInt> StructuralEq for NonZero<T>
impl<T: PrimInt> StructuralPartialEq for NonZero<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for NonZero<T>where T: RefUnwindSafe,
impl<T> Send for NonZero<T>where T: Send,
impl<T> Sync for NonZero<T>where T: Sync,
impl<T> Unpin for NonZero<T>where T: Unpin,
impl<T> UnwindSafe for NonZero<T>where T: UnwindSafe,
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