pub trait Chip<F: FieldExt>: Sized {
    type Config: Debug + Clone;
    type Loaded: Debug + Clone;

    fn config(&self) -> &Self::Config;
    fn loaded(&self) -> &Self::Loaded;
}
Expand description

A chip implements a set of instructions that can be used by gadgets.

The chip stores state that is required at circuit synthesis time in Chip::Config, which can be fetched via Chip::config.

The chip also loads any fixed configuration needed at synthesis time using its own implementation of load, and stores it in Chip::Loaded. This can be accessed via Chip::loaded.

Required Associated Types

A type that holds the configuration for this chip, and any other state it may need during circuit synthesis, that can be derived during Circuit::configure.

A type that holds any general chip state that needs to be loaded at the start of Circuit::synthesize. This might simply be () for some chips.

Required Methods

The chip holds its own configuration.

Provides access to general chip state loaded at the beginning of circuit synthesis.

Panics if called before Chip::load.

Implementors