pub trait Metadata {
// Required methods
fn field(&self) -> &BigInt;
fn curve(&self) -> &CurveType;
fn proving_system(&self) -> &ProvingSystem;
}Expand description
Trait for accessing metadata information from proof system configurations.
This trait provides a standardized interface for retrieving metadata from various backend configurations. It enables generic code to inspect the properties of different proving systems without knowing their specific types.
§Methods
field: Returns the prime field moduluscurve: Returns the elliptic curve typeproving_system: Returns the proving system type
§Usage
This trait is typically implemented by backend types to provide introspection capabilities and enable metadata-aware generic programming.
ⓘ
fn inspect_backend<T: Metadata>(backend: &T) {
println!("Curve: {:?}", backend.curve());
println!("Proving system: {:?}", backend.proving_system());
println!("Field size: {} bits", backend.field().bits());
}Required Methods§
Sourcefn field(&self) -> &BigInt
fn field(&self) -> &BigInt
Returns a reference to the prime field modulus used by this configuration.
Sourcefn curve(&self) -> &CurveType
fn curve(&self) -> &CurveType
Returns a reference to the elliptic curve type used by this configuration.
Sourcefn proving_system(&self) -> &ProvingSystem
fn proving_system(&self) -> &ProvingSystem
Returns a reference to the proving system type used by this configuration.