pub struct P2;Trait Implementations§
Source§impl AddAssign<P2> for u32
impl AddAssign<P2> for u32
Source§fn add_assign(&mut self, other: P2)
fn add_assign(&mut self, other: P2)
Performs the
+= operation. Read moreSource§impl Arbitrary for P2
Available on crate feature proptest only.
impl Arbitrary for P2
Available on crate feature
proptest only.Source§type Parameters = Option<NonZero<u32>>
type Parameters = Option<NonZero<u32>>
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§fn arbitrary_with(_max: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_max: Self::Parameters) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for P2
impl<'de> Deserialize<'de> for P2
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign<P2> for u32
impl DivAssign<P2> for u32
Source§fn div_assign(&mut self, other: P2)
fn div_assign(&mut self, other: P2)
Performs the
/= operation. Read moreSource§impl MulAssign<P2> for u32
impl MulAssign<P2> for u32
Source§fn mul_assign(&mut self, other: P2)
fn mul_assign(&mut self, other: P2)
Performs the
*= operation. Read moreSource§impl PartialOrd<u32> for P2
impl PartialOrd<u32> for P2
Source§impl Prime for P2
impl Prime for P2
fn as_i32(self) -> i32
fn to_dyn(self) -> ValidPrime
fn as_u32(self) -> u32
fn as_usize(self) -> usize
Source§fn product(self, n1: u32, n2: u32) -> u32
fn product(self, n1: u32, n2: u32) -> u32
Computes the product mod p. This takes care of overflow.
fn inverse(self, k: u32) -> u32
fn pow(self, exp: u32) -> u32
fn pow_mod(self, b: u32, e: u32) -> u32
Source§impl RemAssign<P2> for u32
impl RemAssign<P2> for u32
Source§fn rem_assign(&mut self, other: P2)
fn rem_assign(&mut self, other: P2)
Performs the
%= operation. Read moreSource§impl ShlAssign<P2> for u32
impl ShlAssign<P2> for u32
Source§fn shl_assign(&mut self, other: P2)
fn shl_assign(&mut self, other: P2)
Performs the
<<= operation. Read moreSource§impl ShrAssign<P2> for u32
impl ShrAssign<P2> for u32
Source§fn shr_assign(&mut self, other: P2)
fn shr_assign(&mut self, other: P2)
Performs the
>>= operation. Read moreSource§impl SubAssign<P2> for u32
impl SubAssign<P2> for u32
Source§fn sub_assign(&mut self, other: P2)
fn sub_assign(&mut self, other: P2)
Performs the
-= operation. Read moreSource§impl TryFrom<u32> for P2
impl TryFrom<u32> for P2
Source§type Error = PrimeError
type Error = PrimeError
The type returned in the event of a conversion error.
impl Copy for P2
impl Eq for P2
impl MaybeArbitrary<Option<NonZero<u32>>> for P2
impl StructuralPartialEq for P2
Auto Trait Implementations§
impl Freeze for P2
impl RefUnwindSafe for P2
impl Send for P2
impl Sync for P2
impl Unpin for P2
impl UnwindSafe for P2
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more