impl ConditionallySelectable for Field

This commit is contained in:
Jack Grigg
2019-12-12 23:15:48 +00:00
parent cded08b0c5
commit 662be3551f
12 changed files with 74 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ use std::error::Error;
use std::fmt;
use std::io::{self, Read, Write};
use std::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign};
use subtle::ConditionallySelectable;
/// This trait represents an element of a field.
pub trait Field:
@@ -24,6 +25,7 @@ pub trait Field:
+ fmt::Debug
+ fmt::Display
+ 'static
+ ConditionallySelectable
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>