Metadata

Trait Metadata 

Source
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 modulus
  • curve: Returns the elliptic curve type
  • proving_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§

Source

fn field(&self) -> &BigInt

Returns a reference to the prime field modulus used by this configuration.

Source

fn curve(&self) -> &CurveType

Returns a reference to the elliptic curve type used by this configuration.

Source

fn proving_system(&self) -> &ProvingSystem

Returns a reference to the proving system type used by this configuration.

Implementors§