yui_core/abst/
r_mod.rs

1use std::ops::{Mul, MulAssign};
2use crate::{AddGrp, AddGrpOps, Ring, RingOps};
3
4// R-Modules
5
6pub trait RModOps<R, T>: 
7    AddGrpOps<T> + 
8    Mul<R, Output = T> + 
9    for<'a> Mul<&'a R, Output = T>
10where 
11    R: Ring, for<'x> &'x R: RingOps<R>
12{}
13
14pub trait RMod:
15    AddGrp + 
16    RModOps<Self::R, Self> + 
17    MulAssign<Self::R> +
18    for<'a> MulAssign<&'a Self::R>
19where 
20    Self::R: Ring, for<'x> &'x Self::R: RingOps<Self::R>, 
21    for<'a> &'a Self: RModOps<Self::R, Self>,
22{
23    type R;
24}
25