pub trait CommitmentScheme {
type Input;
type Output: Clone + Debug + PartialEq + Eq + Hash;
type Randomness: Clone + Debug + PartialEq + Eq + UniformRand;
type Error: Error;
// Required methods
fn commit<T: Borrow<Self::Input>>(
input: T,
r: Option<&Self::Randomness>,
) -> Result<Self::Output, Self::Error>;
fn verify<T: Borrow<Self::Input>>(
input: T,
r: Option<&Self::Randomness>,
comm: &Self::Output,
) -> Result<Result<(), ()>, Self::Error>;
}Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".