pub trait LoadedScalar<F: PrimeField>:
Clone
+ Debug
+ PartialEq
+ FieldOps {
type Loader: ScalarLoader<F, LoadedScalar = Self>;
// Required methods
fn loader(&self) -> &Self::Loader;
fn pow_var(&self, exp: &Self, exp_max_bits: usize) -> Self;
// Provided methods
fn square(&self) -> Self { ... }
fn invert(&self) -> Option<Self> { ... }
fn pow_const(&self, exp: u64) -> Self { ... }
fn powers(&self, n: usize) -> Vec<Self> { ... }
}
Expand description
Loaded field element.
Required Associated Types§
Sourcetype Loader: ScalarLoader<F, LoadedScalar = Self>
type Loader: ScalarLoader<F, LoadedScalar = Self>
Required Methods§
Sourcefn pow_var(&self, exp: &Self, exp_max_bits: usize) -> Self
fn pow_var(&self, exp: &Self, exp_max_bits: usize) -> Self
Returns power to exponent, where exponent is also LoadedScalar
.
If Loader
is for Halo2, then exp
must have at most exp_max_bits
bits (otherwise constraints will fail).
Currently unimplemented for EvmLoader
Provided Methods§
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.