Struct beetle_nonzero::NonZero
source · pub struct NonZero<T: Uint> { /* private fields */ }Expand description
A wrapper around a primitive non-zero integer like i32 or u32.
Implementations§
Trait Implementations§
source§impl<T: Uint> AddAssign<NonZero<T>> for NonZero<T>
impl<T: Uint> AddAssign<NonZero<T>> for NonZero<T>
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl<T: Uint> DivAssign<NonZero<T>> for NonZero<T>
impl<T: Uint> DivAssign<NonZero<T>> for NonZero<T>
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moresource§impl From<NonZeroU128> for NonZero<u128>
impl From<NonZeroU128> for NonZero<u128>
source§fn from(value: NonZeroU128) -> Self
fn from(value: NonZeroU128) -> Self
Converts to this type from the input type.
source§impl From<NonZeroU16> for NonZero<u16>
impl From<NonZeroU16> for NonZero<u16>
source§fn from(value: NonZeroU16) -> Self
fn from(value: NonZeroU16) -> Self
Converts to this type from the input type.
source§impl From<NonZeroU32> for NonZero<u32>
impl From<NonZeroU32> for NonZero<u32>
source§fn from(value: NonZeroU32) -> Self
fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl From<NonZeroU64> for NonZero<u64>
impl From<NonZeroU64> for NonZero<u64>
source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
source§impl From<NonZeroUsize> for NonZero<usize>
impl From<NonZeroUsize> for NonZero<usize>
source§fn from(value: NonZeroUsize) -> Self
fn from(value: NonZeroUsize) -> Self
Converts to this type from the input type.
source§impl LeadingOnes for NonZero<u128>
impl LeadingOnes for NonZero<u128>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingOnes for NonZero<u16>
impl LeadingOnes for NonZero<u16>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingOnes for NonZero<u32>
impl LeadingOnes for NonZero<u32>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingOnes for NonZero<u64>
impl LeadingOnes for NonZero<u64>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingOnes for NonZero<u8>
impl LeadingOnes for NonZero<u8>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingOnes for NonZero<usize>
impl LeadingOnes for NonZero<usize>
source§fn leading_ones(&self) -> u64
fn leading_ones(&self) -> u64
Returns the number of leading ones in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<u128>
impl LeadingZeros for NonZero<u128>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<u16>
impl LeadingZeros for NonZero<u16>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<u32>
impl LeadingZeros for NonZero<u32>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<u64>
impl LeadingZeros for NonZero<u64>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<u8>
impl LeadingZeros for NonZero<u8>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl LeadingZeros for NonZero<usize>
impl LeadingZeros for NonZero<usize>
source§fn leading_zeros(&self) -> u64
fn leading_zeros(&self) -> u64
Returns the number of leading zeros in the binary representation of the nonzero integer
source§impl<T: Uint> MulAssign<NonZero<T>> for NonZero<T>
impl<T: Uint> MulAssign<NonZero<T>> for NonZero<T>
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moresource§impl<T: Ord + Uint> Ord for NonZero<T>
impl<T: Ord + Uint> 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 + Uint> PartialEq<NonZero<T>> for NonZero<T>
impl<T: PartialEq + Uint> PartialEq<NonZero<T>> for NonZero<T>
source§impl<T: PartialOrd + Uint> PartialOrd<NonZero<T>> for NonZero<T>
impl<T: PartialOrd + Uint> 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: Uint> SubAssign<NonZero<T>> for NonZero<T>
impl<T: Uint> SubAssign<NonZero<T>> for NonZero<T>
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moresource§impl TrailingOnes for NonZero<BigUint>
impl TrailingOnes for NonZero<BigUint>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<u128>
impl TrailingOnes for NonZero<u128>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<u16>
impl TrailingOnes for NonZero<u16>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<u32>
impl TrailingOnes for NonZero<u32>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<u64>
impl TrailingOnes for NonZero<u64>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<u8>
impl TrailingOnes for NonZero<u8>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingOnes for NonZero<usize>
impl TrailingOnes for NonZero<usize>
source§fn trailing_ones(&self) -> u64
fn trailing_ones(&self) -> u64
Returns the number of trailing ones in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<BigUint>
impl TrailingZeros for NonZero<BigUint>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<u128>
impl TrailingZeros for NonZero<u128>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<u16>
impl TrailingZeros for NonZero<u16>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<u32>
impl TrailingZeros for NonZero<u32>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<u64>
impl TrailingZeros for NonZero<u64>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<u8>
impl TrailingZeros for NonZero<u8>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl TrailingZeros for NonZero<usize>
impl TrailingZeros for NonZero<usize>
source§fn trailing_zeros(&self) -> u64
fn trailing_zeros(&self) -> u64
Returns the number of trailing zeros in the binary representation of the nonzero integer
source§impl WithoutTrailingZeros for NonZero<BigUint>
impl WithoutTrailingZeros for NonZero<BigUint>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<u128>
impl WithoutTrailingZeros for NonZero<u128>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<u16>
impl WithoutTrailingZeros for NonZero<u16>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<u32>
impl WithoutTrailingZeros for NonZero<u32>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<u64>
impl WithoutTrailingZeros for NonZero<u64>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<u8>
impl WithoutTrailingZeros for NonZero<u8>
fn without_trailing_zeros(&self) -> Self
source§impl WithoutTrailingZeros for NonZero<usize>
impl WithoutTrailingZeros for NonZero<usize>
fn without_trailing_zeros(&self) -> Self
impl<T> Copy for NonZero<T>where T: Copy + Clone + Uint,
impl<T: Eq + Uint> Eq for NonZero<T>
impl<T: Uint> StructuralEq for NonZero<T>
impl<T: Uint> 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