pub struct Modulo<const M: i64> {
pub val: i64,
}
Expand description
Represents an element of the finite (Galois) field of prime order M, where 1 <= M < 2^31.5. If M is not prime, ring operations are still valid but recip() and division are not. Note that the latter operations are also the slowest, so precompute any inverses that you intend to use frequently.
Fields§
§val: i64
Implementations§
Trait Implementations§
impl<const M: i64> Copy for Modulo<M>
impl<const M: i64> Eq for Modulo<M>
impl<const M: i64> StructuralPartialEq for Modulo<M>
Auto Trait Implementations§
impl<const M: i64> Freeze for Modulo<M>
impl<const M: i64> RefUnwindSafe for Modulo<M>
impl<const M: i64> Send for Modulo<M>
impl<const M: i64> Sync for Modulo<M>
impl<const M: i64> Unpin for Modulo<M>
impl<const M: i64> UnwindSafe for Modulo<M>
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