pub trait CircuitConfig: Config {
type Bit: Clone + Variable<Self>;
// Required methods
fn read_bit(builder: &mut Builder<Self>) -> Self::Bit;
fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>;
fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>;
fn ext2felt(
builder: &mut Builder<Self>,
ext: Ext<<Self as Config>::F, <Self as Config>::EF>,
) -> [Felt<<Self as Config>::F>; 4];
fn exp_reverse_bits(
builder: &mut Builder<Self>,
input: Felt<<Self as Config>::F>,
power_bits: Vec<Self::Bit>,
) -> Felt<<Self as Config>::F>;
fn num2bits(
builder: &mut Builder<Self>,
num: Felt<<Self as Config>::F>,
num_bits: usize,
) -> Vec<Self::Bit>;
fn bits2num(
builder: &mut Builder<Self>,
bits: impl IntoIterator<Item = Self::Bit>,
) -> Felt<<Self as Config>::F>;
fn select_chain_ef(
builder: &mut Builder<Self>,
should_swap: Self::Bit,
first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone,
second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone,
) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>;
}
Required Associated Types§
Required Methods§
fn read_bit(builder: &mut Builder<Self>) -> Self::Bit
fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>
fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>
fn ext2felt( builder: &mut Builder<Self>, ext: Ext<<Self as Config>::F, <Self as Config>::EF>, ) -> [Felt<<Self as Config>::F>; 4]
fn exp_reverse_bits( builder: &mut Builder<Self>, input: Felt<<Self as Config>::F>, power_bits: Vec<Self::Bit>, ) -> Felt<<Self as Config>::F>
fn num2bits( builder: &mut Builder<Self>, num: Felt<<Self as Config>::F>, num_bits: usize, ) -> Vec<Self::Bit>
fn bits2num( builder: &mut Builder<Self>, bits: impl IntoIterator<Item = Self::Bit>, ) -> Felt<<Self as Config>::F>
fn select_chain_ef( builder: &mut Builder<Self>, should_swap: Self::Bit, first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, ) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>
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.