Skip to main content

InputizeEmulated

Trait InputizeEmulated 

Source
pub trait InputizeEmulated<F> {
    // Required method
    fn inputize_emulated(&self) -> Vec<F>;
}
Expand description

InputizeEmulated converts a value into a vector of field elements, ordered in the same way as how the value’s corresponding in-circuit variable would be represented in the emulated way in the circuit when allocated as public input.

This is useful for the verifier to compute the public inputs.

Note that we require this trait because we need to distinguish between some data types that can be represented in both the canonical and emulated ways in-circuit (e.g., field elements or elliptic curve points).

Required Methods§

Source

fn inputize_emulated(&self) -> Vec<F>

InputizeEmulated::inputize_emulated outputs the underlying field elements of self as if it is allocated in the emulated way in-circuit.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<F, T: InputizeEmulated<F>> InputizeEmulated<F> for [T]

Source§

impl<P: SWCurveConfig<BaseField: SonobeField, ScalarField: SonobeField>> InputizeEmulated<<P as CurveConfig>::ScalarField> for Projective<P>

Implementors§