pub struct ModNumC<N: FromPrimitive, const M: usize> { /* private fields */ }
Expand description
Represents an integer a (mod M)
Implementations§
Trait Implementations§
Source§impl<N: NumType, const M: usize> AddAssign<N> for ModNumC<N, M>
impl<N: NumType, const M: usize> AddAssign<N> for ModNumC<N, M>
Source§fn add_assign(&mut self, rhs: N)
fn add_assign(&mut self, rhs: N)
Performs the
+=
operation. Read moreSource§impl<N: NumType, const M: usize> AddAssign for ModNumC<N, M>
impl<N: NumType, const M: usize> AddAssign for ModNumC<N, M>
Source§fn add_assign(&mut self, rhs: ModNumC<N, M>)
fn add_assign(&mut self, rhs: ModNumC<N, M>)
Performs the
+=
operation. Read moreSource§impl<N: NumType + Signed, const M: usize> DivAssign<N> for ModNumC<N, M>
impl<N: NumType + Signed, const M: usize> DivAssign<N> for ModNumC<N, M>
Source§fn div_assign(&mut self, rhs: N)
fn div_assign(&mut self, rhs: N)
Performs the
/=
operation. Read moreSource§impl<N: NumType + Signed, const M: usize> DivAssign for ModNumC<N, M>
impl<N: NumType + Signed, const M: usize> DivAssign for ModNumC<N, M>
Source§fn div_assign(&mut self, rhs: ModNumC<N, M>)
fn div_assign(&mut self, rhs: ModNumC<N, M>)
Performs the
/=
operation. Read moreSource§impl<N: NumType, const M: usize> MNum for ModNumC<N, M>
impl<N: NumType, const M: usize> MNum for ModNumC<N, M>
Source§impl<N: NumType, const M: usize> MulAssign<N> for ModNumC<N, M>
impl<N: NumType, const M: usize> MulAssign<N> for ModNumC<N, M>
Source§fn mul_assign(&mut self, rhs: N)
fn mul_assign(&mut self, rhs: N)
Performs the
*=
operation. Read moreSource§impl<N: NumType, const M: usize> MulAssign for ModNumC<N, M>
impl<N: NumType, const M: usize> MulAssign for ModNumC<N, M>
Source§fn mul_assign(&mut self, rhs: ModNumC<N, M>)
fn mul_assign(&mut self, rhs: ModNumC<N, M>)
Performs the
*=
operation. Read moreSource§impl<N: Ord + FromPrimitive, const M: usize> Ord for ModNumC<N, M>
impl<N: Ord + FromPrimitive, const M: usize> Ord for ModNumC<N, M>
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<N: NumType, const M: usize> PartialEq<N> for ModNumC<N, M>
Returns true if other is congruent to self.a() (mod self.m())
impl<N: NumType, const M: usize> PartialEq<N> for ModNumC<N, M>
Returns true if other is congruent to self.a() (mod self.m())
Source§impl<N: NumType, const M: usize> PartialOrd<N> for ModNumC<N, M>
impl<N: NumType, const M: usize> PartialOrd<N> for ModNumC<N, M>
Source§impl<N: PartialOrd + FromPrimitive, const M: usize> PartialOrd for ModNumC<N, M>
impl<N: PartialOrd + FromPrimitive, const M: usize> PartialOrd for ModNumC<N, M>
Source§impl<N: NumType, const M: usize> SaturatingAdd for ModNumC<N, M>
impl<N: NumType, const M: usize> SaturatingAdd for ModNumC<N, M>
Source§fn saturating_add(&self, v: &Self) -> Self
fn saturating_add(&self, v: &Self) -> Self
Saturating addition. Computes
self + other
, saturating at the relevant high or low boundary of
the type.Source§impl<N: NumType, const M: usize> SaturatingSub for ModNumC<N, M>
impl<N: NumType, const M: usize> SaturatingSub for ModNumC<N, M>
Source§fn saturating_sub(&self, v: &Self) -> Self
fn saturating_sub(&self, v: &Self) -> Self
Saturating subtraction. Computes
self - other
, saturating at the relevant high or low boundary of
the type.Source§impl<N: NumType, const M: usize> SubAssign<N> for ModNumC<N, M>
impl<N: NumType, const M: usize> SubAssign<N> for ModNumC<N, M>
Source§fn sub_assign(&mut self, rhs: N)
fn sub_assign(&mut self, rhs: N)
Performs the
-=
operation. Read moreSource§impl<N: NumType, const M: usize> SubAssign for ModNumC<N, M>
impl<N: NumType, const M: usize> SubAssign for ModNumC<N, M>
Source§fn sub_assign(&mut self, rhs: ModNumC<N, M>)
fn sub_assign(&mut self, rhs: ModNumC<N, M>)
Performs the
-=
operation. Read moreimpl<N: Copy + FromPrimitive, const M: usize> Copy for ModNumC<N, M>
impl<N: Eq + FromPrimitive, const M: usize> Eq for ModNumC<N, M>
impl<N: FromPrimitive, const M: usize> StructuralPartialEq for ModNumC<N, M>
Auto Trait Implementations§
impl<N, const M: usize> Freeze for ModNumC<N, M>where
N: Freeze,
impl<N, const M: usize> RefUnwindSafe for ModNumC<N, M>where
N: RefUnwindSafe,
impl<N, const M: usize> Send for ModNumC<N, M>where
N: Send,
impl<N, const M: usize> Sync for ModNumC<N, M>where
N: Sync,
impl<N, const M: usize> Unpin for ModNumC<N, M>where
N: Unpin,
impl<N, const M: usize> UnwindSafe for ModNumC<N, M>where
N: 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