pub trait Setup<'a> {
type Reference;
type Parameters;
type Preprocessing;
type Error;
// Required methods
fn setup_reference<'b: 'a>(
&mut self,
reference: &'b Self::Reference,
) -> Result<(), Self::Error>;
fn setup_parameters<'b: 'a>(
&mut self,
parameters: &'b Self::Parameters,
) -> Result<(), Self::Error>;
fn detach(&mut self);
fn reference(&self) -> Result<&'a Self::Reference, Self::Error>;
fn parameters(&self) -> Result<&'a Self::Parameters, Self::Error>;
fn preprocessing(&self) -> Result<Self::Preprocessing, Self::Error>;
}
Expand description
An object that can be configured with necessary parameters for proving and verification.
Currently only used by the legacy prover integrations.
Required Associated Types§
Sourcetype Parameters
type Parameters
Global parameters without trust assumptions.
Sourcetype Preprocessing
type Preprocessing
Program-specific parameters.
type Error
Required Methods§
Sourcefn setup_reference<'b: 'a>(
&mut self,
reference: &'b Self::Reference,
) -> Result<(), Self::Error>
fn setup_reference<'b: 'a>( &mut self, reference: &'b Self::Reference, ) -> Result<(), Self::Error>
Configure reference string.
Sourcefn setup_parameters<'b: 'a>(
&mut self,
parameters: &'b Self::Parameters,
) -> Result<(), Self::Error>
fn setup_parameters<'b: 'a>( &mut self, parameters: &'b Self::Parameters, ) -> Result<(), Self::Error>
Configure parameters string.
Sourcefn detach(&mut self)
fn detach(&mut self)
Detach prover or proof from setup to make it easier to pass around without needing to manage lifetimes.
Sourcefn reference(&self) -> Result<&'a Self::Reference, Self::Error>
fn reference(&self) -> Result<&'a Self::Reference, Self::Error>
Access reference through borrow.
Sourcefn parameters(&self) -> Result<&'a Self::Parameters, Self::Error>
fn parameters(&self) -> Result<&'a Self::Parameters, Self::Error>
Access parameters through borrow.
Sourcefn preprocessing(&self) -> Result<Self::Preprocessing, Self::Error>
fn preprocessing(&self) -> Result<Self::Preprocessing, Self::Error>
Return preprocessing.