pub struct Modular<T: Clone + Eq + Rem<Output = T>> { /* private fields */ }
Expand description
Represents an integer with an associated modulus.
Implementations§
Trait Implementations§
Source§impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One> Add for Modular<T>
impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One> Add for Modular<T>
Source§impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Sub<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One> Sub for Modular<T>
impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Sub<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One> Sub for Modular<T>
impl<T: Copy + Clone + Eq + Rem<Output = T>> Copy for Modular<T>
impl<T: Eq + Clone + Eq + Rem<Output = T>> Eq for Modular<T>
impl<T: Clone + Eq + Rem<Output = T>> StructuralPartialEq for Modular<T>
Auto Trait Implementations§
impl<T> Freeze for Modular<T>where
T: Freeze,
impl<T> RefUnwindSafe for Modular<T>where
T: RefUnwindSafe,
impl<T> Send for Modular<T>where
T: Send,
impl<T> Sync for Modular<T>where
T: Sync,
impl<T> Unpin for Modular<T>where
T: Unpin,
impl<T> UnwindSafe for Modular<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