pub struct StaticModular<T: Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize>(/* private fields */);
Expand description
Represents an integer with a statically specified modulus.
Implementations§
Trait Implementations§
Source§impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One + From<usize>, const M: usize> Add for StaticModular<T, M>
impl<T: CheckedAdd + Clone + Eq + Rem<Output = T> + Shr<Output = T> + BitAnd<Output = T> + One + From<usize>, const M: usize> Add for StaticModular<T, M>
Source§impl<T: Clone + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> Clone for StaticModular<T, M>
impl<T: Clone + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> Clone for StaticModular<T, M>
Source§fn clone(&self) -> StaticModular<T, M>
fn clone(&self) -> StaticModular<T, M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, const M: usize> From<T> for StaticModular<T, M>
impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, const M: usize> From<T> for StaticModular<T, M>
Source§impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, U, const M: usize> Index<StaticModular<T, M>> for [U]
impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, U, const M: usize> Index<StaticModular<T, M>> for [U]
Source§impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, U, const M: usize> IndexMut<StaticModular<T, M>> for [U]
impl<T: Clone + Eq + From<usize> + Rem<Output = T> + One, U, const M: usize> IndexMut<StaticModular<T, M>> for [U]
Source§impl<T: PartialEq + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> PartialEq for StaticModular<T, M>
impl<T: PartialEq + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> PartialEq for StaticModular<T, M>
impl<T: Copy + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> Copy for StaticModular<T, M>
impl<T: Eq + Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> Eq for StaticModular<T, M>
impl<T: Clone + Eq + Rem<Output = T> + One + From<usize>, const M: usize> StructuralPartialEq for StaticModular<T, M>
Auto Trait Implementations§
impl<T, const M: usize> Freeze for StaticModular<T, M>where
T: Freeze,
impl<T, const M: usize> RefUnwindSafe for StaticModular<T, M>where
T: RefUnwindSafe,
impl<T, const M: usize> Send for StaticModular<T, M>where
T: Send,
impl<T, const M: usize> Sync for StaticModular<T, M>where
T: Sync,
impl<T, const M: usize> Unpin for StaticModular<T, M>where
T: Unpin,
impl<T, const M: usize> UnwindSafe for StaticModular<T, M>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