pub struct GenericSdk<E, VB>{ /* private fields */ }Expand description
The SDK provides convenience methods and constructors for provers.
A built SDK is an immutable proving environment: user-supplied config, params, and pre-generated
keys are fixed after construction. Use builder for advanced initialization,
or new / new_without_transpiler for the
common config-driven paths.
Internally, the SDK lazily caches proving state that depends only on the app VM config, aggregation config, root params, and optional pre-generated keys. It does not cache any state that depends on the program executable.
Some commonly used methods are:
Implementations§
Source§impl<E, VB> GenericSdk<E, VB>
impl<E, VB> GenericSdk<E, VB>
Sourcepub fn builder() -> GenericSdkBuilder<E, VB>
pub fn builder() -> GenericSdkBuilder<E, VB>
Returns a builder for constructing an immutable GenericSdk.
Sourcepub fn from_cached_proving_key(
cached_pk: SdkCachedProvingKey<VB::VmConfig>,
) -> Result<Self, SdkError>
pub fn from_cached_proving_key( cached_pk: SdkCachedProvingKey<VB::VmConfig>, ) -> Result<Self, SdkError>
Builds an SDK from cached proving keys without deferral prover reconstruction.
This generic constructor requires the cached key to have no deferral proving keys. Use
from_deferral_cached_proving_key for SdkVmConfig caches that include
supported deferral provers.
Source§impl<E, VB> GenericSdk<E, VB>
impl<E, VB> GenericSdk<E, VB>
Sourcepub fn from_deferral_cached_proving_key(
cached_pk: SdkCachedProvingKey<SdkVmConfig>,
) -> Result<Self, SdkError>where
VB: Default,
pub fn from_deferral_cached_proving_key(
cached_pk: SdkCachedProvingKey<SdkVmConfig>,
) -> Result<Self, SdkError>where
VB: Default,
Builds an SDK from proving keys returned by GenericSdk::cached_proving_key.
If the cached key includes deferral proving keys, the SDK reads the app VM deferral config
to initialize the corresponding supported deferral provers. Custom deferral circuit provers
must be manually created and supplied through GenericSdkBuilder::deferral_agg_prover.
Source§impl<E, VB> GenericSdk<E, VB>
impl<E, VB> GenericSdk<E, VB>
pub fn app_config(&self) -> &AppConfig<VB::VmConfig>
pub fn agg_config(&self) -> &AggregationConfig
pub fn agg_tree_config(&self) -> &AggregationTreeConfig
pub fn root_params(&self) -> &SystemParams
pub fn halo2_shape(&self) -> &StaticVerifierShape
pub fn halo2_config(&self) -> &Halo2Config
pub fn app_vm_builder(&self) -> &VB
Sourcepub fn executor(&self) -> &VmExecutor<F, VB::VmConfig>
pub fn executor(&self) -> &VmExecutor<F, VB::VmConfig>
The executor may be used to construct different types of interpreters, given the program,
for more specific execution purposes. By default, it is recommended to use the
execute method.
pub fn halo2_params_reader(&self) -> &CacheHalo2ParamsReader
Source§impl<E, VB> GenericSdk<E, VB>
impl<E, VB> GenericSdk<E, VB>
Sourcepub fn standard(
app_params: SystemParams,
agg_params: AggregationSystemParams,
) -> Self
pub fn standard( app_params: SystemParams, agg_params: AggregationSystemParams, ) -> Self
Creates SDK with a standard configuration that includes a set of default VM extensions loaded.
Note: To use this configuration, your openvm.toml must match
SdkVmConfig::standard, including the order of the moduli and elliptic curve parameters
of the respective extensions. See the openvm-sdk-config crate documentation for the
corresponding TOML.
Sourcepub fn riscv32(
app_params: SystemParams,
agg_params: AggregationSystemParams,
) -> Self
pub fn riscv32( app_params: SystemParams, agg_params: AggregationSystemParams, ) -> Self
Creates SDK with a configuration with RISC-V RV32IM and IO VM extensions loaded.
Note: To use this configuration, your openvm.toml must match
SdkVmConfig::riscv32. See the openvm-sdk-config crate documentation for the
corresponding TOML.
Source§impl<E, VB> GenericSdk<E, VB>
impl<E, VB> GenericSdk<E, VB>
Sourcepub fn new(
app_config: AppConfig<VB::VmConfig>,
agg_params: AggregationSystemParams,
) -> Result<Self, SdkError>
pub fn new( app_config: AppConfig<VB::VmConfig>, agg_params: AggregationSystemParams, ) -> Result<Self, SdkError>
Creates SDK custom to the given AppConfig, with a RISC-V transpiler.
Sourcepub fn new_without_transpiler(
app_config: AppConfig<VB::VmConfig>,
agg_params: AggregationSystemParams,
) -> Result<Self, SdkError>where
VB: Default,
pub fn new_without_transpiler(
app_config: AppConfig<VB::VmConfig>,
agg_params: AggregationSystemParams,
) -> Result<Self, SdkError>where
VB: Default,
Creates an SDK custom to the given AppConfig without configuring a transpiler.
Note: This function does not set the transpiler, which must be done separately to support RISC-V ELFs.
Sourcepub fn def_hook_cached_commit(&self) -> Option<Digest>
pub fn def_hook_cached_commit(&self) -> Option<Digest>
Returns the def_hook_prover cached commit.
Sourcepub fn def_hook_commit(&self) -> Option<Digest>
pub fn def_hook_commit(&self) -> Option<Digest>
Returns the deferral hook commit derived from the deferral aggregation path.
Sourcepub fn deferral_agg_prover(&self) -> Option<Arc<DeferralAggProver>>
pub fn deferral_agg_prover(&self) -> Option<Arc<DeferralAggProver>>
Returns the deferral aggregation prover when this SDK can prove non-empty deferral inputs.
Sourcepub fn deferral_circuit_cached_commits(
&self,
def_idx: usize,
) -> Result<Vec<CommitBytes>, SdkError>
pub fn deferral_circuit_cached_commits( &self, def_idx: usize, ) -> Result<Vec<CommitBytes>, SdkError>
Derives the cached commits that the deferral circuit at def_idx expects callers to fold
into its input commit.
Sourcepub fn cached_proving_key(
&self,
) -> Result<SdkCachedProvingKey<VB::VmConfig>, SdkError>
pub fn cached_proving_key( &self, ) -> Result<SdkCachedProvingKey<VB::VmConfig>, SdkError>
Returns serde-serializable proving keys for this SDK.
This errors if app_pk or agg_pk have not already been generated or seeded into the SDK.
Optional keys are returned only if they are already cached or were seeded into the SDK.
Halo2 proving keys are intentionally excluded; use write_halo2_pk_to_file and
read_halo2_pk_from_file for those.
Sourcepub fn build<P: AsRef<Path>>(
&self,
guest_opts: GuestOptions,
pkg_dir: P,
target_filter: &Option<TargetFilter>,
init_file_name: Option<&str>,
) -> Result<Elf, SdkError>
pub fn build<P: AsRef<Path>>( &self, guest_opts: GuestOptions, pkg_dir: P, target_filter: &Option<TargetFilter>, init_file_name: Option<&str>, ) -> Result<Elf, SdkError>
Builds the guest package located at pkg_dir. This function requires that the build target
is unique and errors otherwise. Returns the built ELF file decoded in the Elf type.
Sourcepub fn transpiler(&self) -> Result<&Transpiler<F>, SdkError>
pub fn transpiler(&self) -> Result<&Transpiler<F>, SdkError>
Transpiler for transpiling RISC-V ELF to OpenVM executable.
Sourcepub fn convert_to_exe(
&self,
executable: impl Into<ExecutableFormat>,
) -> Result<Arc<VmExe<F>>, SdkError>
pub fn convert_to_exe( &self, executable: impl Into<ExecutableFormat>, ) -> Result<Arc<VmExe<F>>, SdkError>
Normalizes an ELF or executable handle into a shared VmExe.
Source§impl<E, VB> GenericSdk<E, VB>where
E: StarkEngine<SC = SC>,
VB: VmBuilder<E> + Clone,
<VB::VmConfig as VmExecutionConfig<F>>::Executor: Executor<F> + MeteredExecutor<F> + PreflightExecutor<F, VB::RecordArena>,
impl<E, VB> GenericSdk<E, VB>where
E: StarkEngine<SC = SC>,
VB: VmBuilder<E> + Clone,
<VB::VmConfig as VmExecutionConfig<F>>::Executor: Executor<F> + MeteredExecutor<F> + PreflightExecutor<F, VB::RecordArena>,
Sourcepub fn execute(
&self,
app_exe: impl Into<ExecutableFormat>,
inputs: StdIn,
) -> Result<Vec<u8>, SdkError>
pub fn execute( &self, app_exe: impl Into<ExecutableFormat>, inputs: StdIn, ) -> Result<Vec<u8>, SdkError>
Returns the user public values as field elements.
Sourcepub fn execute_metered(
&self,
app_exe: impl Into<ExecutableFormat>,
inputs: StdIn,
) -> Result<(Vec<u8>, Vec<Segment>), SdkError>
pub fn execute_metered( &self, app_exe: impl Into<ExecutableFormat>, inputs: StdIn, ) -> Result<(Vec<u8>, Vec<Segment>), SdkError>
Executes with segmentation for proof generation. Returns both user public values and segments with instruction counts and trace heights.
Sourcepub fn execute_metered_cost(
&self,
app_exe: impl Into<ExecutableFormat>,
inputs: StdIn,
) -> Result<(Vec<u8>, (u64, u64)), SdkError>
pub fn execute_metered_cost( &self, app_exe: impl Into<ExecutableFormat>, inputs: StdIn, ) -> Result<(Vec<u8>, (u64, u64)), SdkError>
Executes with cost metering to measure computational cost in trace cells. Returns both user public values, and cost along with instruction count.
Sourcepub fn prove(
&self,
app_exe: impl Into<ExecutableFormat>,
inputs: StdIn,
def_inputs: &[DeferralInput],
) -> Result<(VmStarkProof, VerificationBaseline), SdkError>
pub fn prove( &self, app_exe: impl Into<ExecutableFormat>, inputs: StdIn, def_inputs: &[DeferralInput], ) -> Result<(VmStarkProof, VerificationBaseline), SdkError>
Generates a single aggregate STARK proof of the full program execution of the given
app_exe with program inputs inputs.\
For convenience, this function also returns the VerificationBaseline, which is a full
commitment to the App VmExe and aggregation verifiers. It does not depend on the
inputs. It can be generated separately from the proof by creating a
prover and calling
app_vm_commit.
If STARK aggregation is not needed and a proof whose size may grow linearly with the length
of the program runtime is desired, create an app_prover and call
app_prover.prove(inputs).
Sourcepub fn prove_evm(
&self,
app_exe: impl Into<ExecutableFormat>,
inputs: StdIn,
def_inputs: &[DeferralInput],
) -> Result<EvmProof, SdkError>
pub fn prove_evm( &self, app_exe: impl Into<ExecutableFormat>, inputs: StdIn, def_inputs: &[DeferralInput], ) -> Result<EvmProof, SdkError>
Generates an EVM-verifiable proof for the given executable and inputs.
Sourcepub fn app_prover(
&self,
exe: impl Into<ExecutableFormat>,
) -> Result<AppProver<E, VB>, SdkError>
pub fn app_prover( &self, exe: impl Into<ExecutableFormat>, ) -> Result<AppProver<E, VB>, SdkError>
This constructor is for generating app proofs that do not require a single aggregate STARK
proof of the full program execution. For a single STARK proof, use the
prove method instead.
Creates an app prover instance specific to the provided exe. This function will generate the AppProvingKey if it doesn’t already exist and use it to construct the AppProver.
Sourcepub fn prover(
&self,
app_exe: impl Into<ExecutableFormat>,
) -> Result<StarkProver<E, VB>, SdkError>
pub fn prover( &self, app_exe: impl Into<ExecutableFormat>, ) -> Result<StarkProver<E, VB>, SdkError>
Constructs a new StarkProver instance for the given executable. This function will generate the AppProvingKey if it does not already exist.
Sourcepub fn evm_prover_without_halo2(
&self,
app_exe: impl Into<ExecutableFormat>,
) -> Result<EvmProver<E, VB>, SdkError>
pub fn evm_prover_without_halo2( &self, app_exe: impl Into<ExecutableFormat>, ) -> Result<EvmProver<E, VB>, SdkError>
Constructs an EvmProver for the given executable with only the root prover, generating
prerequisite keys, lazily
Sourcepub fn evm_prover(
&self,
app_exe: impl Into<ExecutableFormat>,
) -> Result<EvmProver<E, VB>, SdkError>
pub fn evm_prover( &self, app_exe: impl Into<ExecutableFormat>, ) -> Result<EvmProver<E, VB>, SdkError>
Constructs an EvmProver for the given executable, generating prerequisite keys lazily.
Sourcepub fn agg_prover(&self) -> Arc<AggProver>
pub fn agg_prover(&self) -> Arc<AggProver>
Returns the cached aggregation prover, generating it on first use if needed.
Sourcepub fn root_prover(&self) -> Arc<RootProver>
pub fn root_prover(&self) -> Arc<RootProver>
Returns the cached root prover, generating it on first use if needed.
Sourcepub fn halo2_prover(&self) -> Halo2Prover
pub fn halo2_prover(&self) -> Halo2Prover
Returns the cached Halo2 prover, generating it on first use if needed.
Sourcepub fn app_keygen(&self) -> (AppProvingKey<VB::VmConfig>, AppVerifyingKey)
pub fn app_keygen(&self) -> (AppProvingKey<VB::VmConfig>, AppVerifyingKey)
Generates the app proving key once and caches it. Future calls will return the cached key.
§Panics
This function will panic if the app keygen fails.
Sourcepub fn app_pk(&self) -> &AppProvingKey<VB::VmConfig>
pub fn app_pk(&self) -> &AppProvingKey<VB::VmConfig>
Generates the app proving key once and caches it. Future calls will return the cached key.
§Panics
This function will panic if the app keygen fails.
Sourcepub fn app_vk(&self) -> AppVerifyingKey
pub fn app_vk(&self) -> AppVerifyingKey
Returns the app verifying key derived from the cached app proving key.
Sourcepub fn agg_keygen(&self) -> (AggProvingKey, MultiStarkVerifyingKey<SC>)
pub fn agg_keygen(&self) -> (AggProvingKey, MultiStarkVerifyingKey<SC>)
Generates or retrieves the aggregation proving and verifying keys as a pair.
Sourcepub fn agg_prefix_pk(&self) -> AggPrefixProvingKey
pub fn agg_prefix_pk(&self) -> AggPrefixProvingKey
Generates or retrieves the aggregation prefix proving key without the internal-recursive key.
Sourcepub fn agg_pk(&self) -> AggProvingKey
pub fn agg_pk(&self) -> AggProvingKey
Generates or retrieves the full aggregation proving key.
Sourcepub fn agg_vk(&self) -> Arc<MultiStarkVerifyingKey<SC>>
pub fn agg_vk(&self) -> Arc<MultiStarkVerifyingKey<SC>>
Returns the aggregation verifying key for the recursive aggregation layer.
Sourcepub fn root_pk(&self) -> RootProvingKey
pub fn root_pk(&self) -> RootProvingKey
Generates or retrieves the root proving key and recorded trace heights.
Sourcepub fn halo2_pk(&self) -> Halo2ProvingKey
pub fn halo2_pk(&self) -> Halo2ProvingKey
Generates the Halo2 (static verifier + wrapper) proving key once and caches it.
The flow:
- Get the root VK and internal recursive VK cached commit
- Generate a dummy root proof via the EVM prover pipeline
- Keygen the static verifier circuit
- Generate a dummy snark from the verifier
- Keygen the wrapper circuit (auto-tuned or fixed k)
Sourcepub fn app_commit(
&self,
app_exe: impl Into<ExecutableFormat>,
) -> Result<AppExecutionCommit, SdkError>
pub fn app_commit( &self, app_exe: impl Into<ExecutableFormat>, ) -> Result<AppExecutionCommit, SdkError>
Generates the AppExecutionCommit for the given executable.
This function will generate the app_pk if it does not already exist.
Sourcepub fn verify_proof(
agg_vk: MultiStarkVerifyingKey<SC>,
baseline: VerificationBaseline,
proof: &VmStarkProof,
) -> Result<(), SdkError>
pub fn verify_proof( agg_vk: MultiStarkVerifyingKey<SC>, baseline: VerificationBaseline, proof: &VmStarkProof, ) -> Result<(), SdkError>
Verifies aggregate STARK proof of VM execution.
Note: This function does not have any reliance on self and does not depend on the app
config set in the Sdk.
Sourcepub fn generate_halo2_verifier_solidity(
&self,
) -> Result<EvmHalo2Verifier, SdkError>
pub fn generate_halo2_verifier_solidity( &self, ) -> Result<EvmHalo2Verifier, SdkError>
Generates Solidity verifier artifacts for the cached Halo2 proving key.
Sourcepub fn generate_halo2_verifier_solidity_with_version_name(
&self,
version_name: &str,
) -> Result<EvmHalo2Verifier, SdkError>
pub fn generate_halo2_verifier_solidity_with_version_name( &self, version_name: &str, ) -> Result<EvmHalo2Verifier, SdkError>
Generates Solidity verifier artifacts under src/{version_name} in the solc source map.
Solidity embeds source metadata in bytecode, so version_name should match the directory
where the generated verifier contracts will be written.
Sourcepub fn verify_evm_halo2_proof(
openvm_verifier: &EvmHalo2Verifier,
evm_proof: EvmProof,
expected_app_commit: Option<AppExecutionCommit>,
) -> Result<u64, SdkError>
pub fn verify_evm_halo2_proof( openvm_verifier: &EvmHalo2Verifier, evm_proof: EvmProof, expected_app_commit: Option<AppExecutionCommit>, ) -> Result<u64, SdkError>
Uses the verify(..) interface of the OpenVmHalo2Verifier contract.
Requires the evm-verify feature. Internally deploys the verifier bytecode in a local EVM
and executes the verification call. If expected_app_commit is provided, it will check the
proof’s app_commit against it.
Auto Trait Implementations§
impl<E, VB> !Freeze for GenericSdk<E, VB>
impl<E, VB> !RefUnwindSafe for GenericSdk<E, VB>
impl<E, VB> !Send for GenericSdk<E, VB>
impl<E, VB> !Sync for GenericSdk<E, VB>
impl<E, VB> Unpin for GenericSdk<E, VB>
impl<E, VB> !UnwindSafe for GenericSdk<E, VB>
Blanket Implementations§
§impl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
§impl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
§impl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
§impl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
§impl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
§impl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
§impl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
§impl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
§impl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
§impl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
§impl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
§impl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
§impl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
§impl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
§impl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
§impl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset. Read more§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset. Read more§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset. Read more§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset. Read more§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
§impl<F, Fp, Pt, FC> Selectable<F, Reduced<Pt, Fp>> for FCwhere
F: BigPrimeField,
Pt: Clone,
FC: Selectable<F, Pt>,
impl<F, Fp, Pt, FC> Selectable<F, Reduced<Pt, Fp>> for FCwhere
F: BigPrimeField,
Pt: Clone,
FC: Selectable<F, Pt>,
fn select( &self, ctx: &mut Context<F>, a: Reduced<Pt, Fp>, b: Reduced<Pt, Fp>, sel: AssignedValue<F>, ) -> Reduced<Pt, Fp>
fn select_by_indicator( &self, ctx: &mut Context<F>, a: &impl AsRef<[Reduced<Pt, Fp>]>, coeffs: &[AssignedValue<F>], ) -> Reduced<Pt, Fp>
§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read more§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read more§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.