Trait sp1_core::operations::field::params::FieldParameters
source · pub trait FieldParameters: Send + Sync + Copy + 'static + Debug + Serialize + DeserializeOwned + NumLimbs {
const WITNESS_OFFSET: usize;
const MODULUS: &'static [u8];
const NB_BITS_PER_LIMB: usize = 8usize;
const NB_LIMBS: usize = <Self::Limbs>::USIZE;
const NB_WITNESS_LIMBS: usize = <Self::Witness>::USIZE;
// Provided methods
fn modulus() -> BigUint { ... }
fn nb_bits() -> usize { ... }
fn modulus_field_iter<F: Field>() -> impl Iterator<Item = F> { ... }
fn to_limbs(x: &BigUint) -> Vec<u8> ⓘ { ... }
fn to_limbs_field_vec<E: From<F>, F: Field>(x: &BigUint) -> Vec<E> { ... }
fn to_limbs_field<E: From<F>, F: Field>(
x: &BigUint,
) -> Limbs<E, Self::Limbs> { ... }
}Required Associated Constants§
const WITNESS_OFFSET: usize
Provided Associated Constants§
const NB_BITS_PER_LIMB: usize = 8usize
const NB_LIMBS: usize = <Self::Limbs>::USIZE
const NB_WITNESS_LIMBS: usize = <Self::Witness>::USIZE
Provided Methods§
fn modulus() -> BigUint
fn nb_bits() -> usize
fn modulus_field_iter<F: Field>() -> impl Iterator<Item = F>
sourcefn to_limbs(x: &BigUint) -> Vec<u8> ⓘ
fn to_limbs(x: &BigUint) -> Vec<u8> ⓘ
Convert a BigUint to a Vec of u8 limbs (with len NB_LIMBS).
Object Safety§
This trait is not object safe.