pub trait CommitmentScheme<InputT> {
type Commitment: Clone;
type Witness: Default + Clone;
// Required methods
fn commit<R: CryptoRngCore>(
&self,
input: &InputT,
rng: R,
) -> (Self::Commitment, Self::Witness);
fn open(
&self,
commitment: &Self::Commitment,
witness: &Self::Witness,
input: &InputT,
) -> Result<(), PrimitiveError>;
}Required Associated Types§
Required Methods§
fn commit<R: CryptoRngCore>( &self, input: &InputT, rng: R, ) -> (Self::Commitment, Self::Witness)
fn open( &self, commitment: &Self::Commitment, witness: &Self::Witness, input: &InputT, ) -> Result<(), PrimitiveError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.