More superclasses.
This commit is contained in:
parent
41ef5fdef0
commit
f40abe6dc3
16
src/lib.rs
16
src/lib.rs
|
@ -50,7 +50,21 @@ impl Mul for Fr {
|
|||
fn mul(self, other: Fr) -> Fr { Fr(self.0 * other.0) }
|
||||
}
|
||||
|
||||
pub trait Group: 'static + Send + Copy + Clone + PartialEq + Eq + Sized + Add<Self, Output=Self> + Sub<Self, Output=Self> + Neg<Output=Self> + Mul<Fr, Output=Self> {
|
||||
pub trait Group:
|
||||
rustc_serialize::Encodable +
|
||||
rustc_serialize::Decodable +
|
||||
'static +
|
||||
Send +
|
||||
Copy +
|
||||
Clone +
|
||||
PartialEq +
|
||||
Eq +
|
||||
Sized +
|
||||
Add<Self, Output=Self> +
|
||||
Sub<Self, Output=Self> +
|
||||
Neg<Output=Self> +
|
||||
Mul<Fr, Output=Self>
|
||||
{
|
||||
fn zero() -> Self;
|
||||
fn one() -> Self;
|
||||
fn random<R: Rng>(rng: &mut R) -> Self;
|
||||
|
|
Loading…
Reference in New Issue