pub struct LookupInfo {
pub max_per_row: usize,
pub max_joint_size: u32,
pub features: LookupFeatures,
}
Expand description
Describes the desired lookup configuration.
Fields§
§max_per_row: usize
The maximum length of an element of kinds
. This can be computed from kinds
.
max_joint_size: u32
The maximum joint size of any joint lookup in a constraint in kinds
. This can be computed from kinds
.
features: LookupFeatures
The features enabled for this lookup configuration
Implementations§
source§impl LookupInfo
impl LookupInfo
pub fn new( max_per_row: usize, max_joint_size: u32, features: LookupFeatures ) -> LookupInfo
source§impl LookupInfo
impl LookupInfo
sourcepub fn create(features: LookupFeatures) -> Self
pub fn create(features: LookupFeatures) -> Self
Create the default lookup configuration.
pub fn create_from_gates<F: PrimeField>( gates: &[CircuitGate<F>], uses_runtime_tables: bool ) -> Option<Self>
sourcepub fn selector_polynomials_and_tables<F: PrimeField>(
&self,
domain: &EvaluationDomains<F>,
gates: &[CircuitGate<F>]
) -> (LookupSelectors<E<F, D<F>>>, Vec<LookupTable<F>>)
pub fn selector_polynomials_and_tables<F: PrimeField>( &self, domain: &EvaluationDomains<F>, gates: &[CircuitGate<F>] ) -> (LookupSelectors<E<F, D<F>>>, Vec<LookupTable<F>>)
Each entry in kinds
has a corresponding selector polynomial that controls whether that
lookup kind should be enforced at a given row. This computes those selector polynomials.
sourcepub fn by_row<F: PrimeField>(
&self,
gates: &[CircuitGate<F>]
) -> Vec<Vec<JointLookupSpec<F>>>
pub fn by_row<F: PrimeField>( &self, gates: &[CircuitGate<F>] ) -> Vec<Vec<JointLookupSpec<F>>>
For each row in the circuit, which lookup-constraints should be enforced at that row.
Trait Implementations§
source§impl Clone for LookupInfo
impl Clone for LookupInfo
source§fn clone(&self) -> LookupInfo
fn clone(&self) -> LookupInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LookupInfo
impl Debug for LookupInfo
source§impl<'de> Deserialize<'de> for LookupInfo
impl<'de> Deserialize<'de> for LookupInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<LookupInfo> for JsValue
impl From<LookupInfo> for JsValue
source§fn from(value: LookupInfo) -> Self
fn from(value: LookupInfo) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for LookupInfo
impl FromWasmAbi for LookupInfo
source§impl IntoWasmAbi for LookupInfo
impl IntoWasmAbi for LookupInfo
source§impl LongRefFromWasmAbi for LookupInfo
impl LongRefFromWasmAbi for LookupInfo
source§impl OptionFromWasmAbi for LookupInfo
impl OptionFromWasmAbi for LookupInfo
source§impl OptionIntoWasmAbi for LookupInfo
impl OptionIntoWasmAbi for LookupInfo
source§impl RefFromWasmAbi for LookupInfo
impl RefFromWasmAbi for LookupInfo
§type Anchor = Ref<'static, LookupInfo>
type Anchor = Ref<'static, LookupInfo>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for LookupInfo
impl RefMutFromWasmAbi for LookupInfo
source§impl Serialize for LookupInfo
impl Serialize for LookupInfo
source§impl TryFromJsValue for LookupInfo
impl TryFromJsValue for LookupInfo
source§impl VectorFromWasmAbi for LookupInfo
impl VectorFromWasmAbi for LookupInfo
type Abi = <Box<[JsValue], Global> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[LookupInfo]>
source§impl VectorIntoWasmAbi for LookupInfo
impl VectorIntoWasmAbi for LookupInfo
type Abi = <Box<[JsValue], Global> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[LookupInfo]>) -> Self::Abi
source§impl WasmDescribeVector for LookupInfo
impl WasmDescribeVector for LookupInfo
impl Copy for LookupInfo
Auto Trait Implementations§
impl RefUnwindSafe for LookupInfo
impl Send for LookupInfo
impl Sync for LookupInfo
impl Unpin for LookupInfo
impl UnwindSafe for LookupInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.