pub trait CommitmentTrait<E: Engine>:
Clone
+ Copy
+ Debug
+ Default
+ PartialEq
+ Eq
+ Send
+ Sync
+ TranscriptReprTrait<E::GE>
+ Serialize
+ for<'de> Deserialize<'de>
+ Abomonation
+ AbsorbInROTrait<E>
+ Add<Self, Output = Self>
+ ScalarMul<E::Scalar> {
type CompressedCommitment: Clone + Debug + PartialEq + Eq + Send + Sync + TranscriptReprTrait<E::GE> + Serialize + for<'de> Deserialize<'de>;
// Required methods
fn compress(&self) -> Self::CompressedCommitment;
fn to_coordinates(&self) -> (E::Base, E::Base, bool);
fn decompress(c: &Self::CompressedCommitment) -> Result<Self, NovaError>;
}Expand description
This trait defines the behavior of the commitment
Required Associated Types§
Sourcetype CompressedCommitment: Clone + Debug + PartialEq + Eq + Send + Sync + TranscriptReprTrait<E::GE> + Serialize + for<'de> Deserialize<'de>
type CompressedCommitment: Clone + Debug + PartialEq + Eq + Send + Sync + TranscriptReprTrait<E::GE> + Serialize + for<'de> Deserialize<'de>
Holds the type of the compressed commitment
Required Methods§
Sourcefn compress(&self) -> Self::CompressedCommitment
fn compress(&self) -> Self::CompressedCommitment
Compresses self into a compressed commitment
Sourcefn to_coordinates(&self) -> (E::Base, E::Base, bool)
fn to_coordinates(&self) -> (E::Base, E::Base, bool)
Returns the coordinate representation of the commitment
Sourcefn decompress(c: &Self::CompressedCommitment) -> Result<Self, NovaError>
fn decompress(c: &Self::CompressedCommitment) -> Result<Self, NovaError>
Decompresses a compressed commitment into a commitment
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.