halo2_base/virtual_region/manager.rs
1use crate::ff::Field;
2use crate::halo2_proofs::circuit::Region;
3
4/// A virtual region manager is responsible for managing a virtual region and assigning the
5/// virtual region to a physical Halo2 region.
6///
7pub trait VirtualRegionManager<F: Field> {
8 /// The Halo2 config with associated columns and gates describing the physical Halo2 region
9 /// that this virtual region manager is responsible for.
10 type Config: Clone;
11 /// Return type of the `assign_raw` method. Default is `()`.
12 type Assignment;
13
14 /// Assign virtual region this is in charge of to the raw region described by `config`.
15 fn assign_raw(&self, config: &Self::Config, region: &mut Region<F>) -> Self::Assignment;
16}