Trait ToElements

Source
pub trait ToElements<E>
where E: FieldElement,
{ // Required method fn to_elements(&self) -> Vec<E>; }
Expand description

Defines how to convert a struct to a vector of field elements.

Required Methods§

Source

fn to_elements(&self) -> Vec<E>

Implementations on Foreign Types§

Source§

impl ToElements<BaseElement> for PublicInputs

Source§

impl<E> ToElements<E> for ()
where E: FieldElement,

Source§

fn to_elements(&self) -> Vec<E>

Source§

impl<E> ToElements<E> for TraceInfo
where E: StarkField,

Source§

fn to_elements(&self) -> Vec<E>

Source§

impl<E> ToElements<E> for ProofOptions
where E: StarkField,

Source§

fn to_elements(&self) -> Vec<E>

Encodes these proof options into 3 field elements.

Source§

impl<E> ToElements<E> for Context
where E: StarkField,

Source§

fn to_elements(&self) -> Vec<E>

Converts this Context into a vector of field elements.

The elements are laid out as follows:

  • trace info:
    • trace segment widths and the number of aux random values [1 element].
    • trace length [1 element].
    • trace metadata [0 or more elements].
  • field modulus bytes [2 field elements].
  • number of constraints (1 element).
  • proof options:
    • field extension, FRI parameters, and grinding factor [1 element].
    • blowup factor [1 element].
    • number of queries [1 element].

Implementors§

Source§

impl<E> ToElements<E> for E
where E: FieldElement,