CircuitInitialization

Trait CircuitInitialization 

Source
pub trait CircuitInitialization<L> {
    type Config: Clone + Debug;
    type Args: Default;
    type ConfigCols: Clone + Debug + AutoConfigure<Self::CS>;
    type CS;
    type Error;

    // Required methods
    fn new_chip(config: &Self::Config, args: Self::Args) -> Self;
    fn configure_circuit(
        meta: &mut Self::CS,
        columns: &Self::ConfigCols,
    ) -> Self::Config;
    fn load_chip(
        &self,
        layouter: &mut L,
        config: &Self::Config,
    ) -> Result<(), Self::Error>;
}
Expand description

Adaptor trait for integrating chips with the extractor.

Required Associated Types§

Source

type Config: Clone + Debug

Configuration of the circuit.

Source

type Args: Default

Arguments required by the circuit.

Source

type ConfigCols: Clone + Debug + AutoConfigure<Self::CS>

Configuration columns of the circuit.

Source

type CS

Constrait system.

Source

type Error

Error type.

Required Methods§

Source

fn new_chip(config: &Self::Config, args: Self::Args) -> Self

Creates a new instance of the chip.

Source

fn configure_circuit( meta: &mut Self::CS, columns: &Self::ConfigCols, ) -> Self::Config

Creates an instance of the chip’s configuration.

Source

fn load_chip( &self, layouter: &mut L, config: &Self::Config, ) -> Result<(), Self::Error>

Loads internal information of the chip.

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.

Implementors§