Trait halo2_frontend::circuit::Chip
source · pub trait Chip<F: Field>: Sized {
type Config: Debug + Clone;
type Loaded: Debug + Clone;
// Required methods
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§
sourcetype Config: Debug + Clone
type Config: Debug + Clone
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
.
sourcetype Loaded: Debug + Clone
type Loaded: Debug + Clone
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§
Object Safety§
This trait is not object safe.