nexus_sdk

Trait Reference

Source
pub trait Reference {
    type Error;

    // Required methods
    fn generate() -> Result<Self, Self::Error>
       where Self: Sized;
    fn load(path: &Path) -> Result<Self, Self::Error>
       where Self: Sized;
    fn save(reference: &Self, path: &Path) -> Result<(), Self::Error>;
}
Expand description

A global, trust-assumption-reliant parameter set used for proving and verifying, such as a common or structured reference string (CRS/SRS).

Currently only used by the legacy prover integrations.

Required Associated Types§

Required Methods§

Source

fn generate() -> Result<Self, Self::Error>
where Self: Sized,

Generate reference.

Source

fn load(path: &Path) -> Result<Self, Self::Error>
where Self: Sized,

Load reference from a file.

Source

fn save(reference: &Self, path: &Path) -> Result<(), Self::Error>

Save reference to a file.

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.

Implementations on Foreign Types§

Source§

impl Reference for ()

Source§

type Error = ConfigurationError

Source§

fn generate() -> Result<Self, Self::Error>

Source§

fn load(_path: &Path) -> Result<Self, Self::Error>

Source§

fn save(_reference: &Self, _path: &Path) -> Result<(), Self::Error>

Implementors§