More superclasses.

This commit is contained in:
Sean Bowe
2016-09-12 14:02:21 -06:00
parent 41ef5fdef0
commit f40abe6dc3
+15 -1
View File
@@ -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;