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§
fn to_elements(&self) -> Vec<E>
Implementations on Foreign Types§
Source§impl ToElements<BaseElement> for PublicInputs
impl ToElements<BaseElement> for PublicInputs
fn to_elements(&self) -> Vec<BaseElement>
Source§impl<E> ToElements<E> for ()where
E: FieldElement,
impl<E> ToElements<E> for ()where
E: FieldElement,
fn to_elements(&self) -> Vec<E>
Source§impl<E> ToElements<E> for TraceInfowhere
E: StarkField,
impl<E> ToElements<E> for TraceInfowhere
E: StarkField,
fn to_elements(&self) -> Vec<E>
Source§impl<E> ToElements<E> for ProofOptionswhere
E: StarkField,
impl<E> ToElements<E> for ProofOptionswhere
E: StarkField,
Source§fn to_elements(&self) -> Vec<E>
fn to_elements(&self) -> Vec<E>
Encodes these proof options into 3 field elements.
Source§impl<E> ToElements<E> for Contextwhere
E: StarkField,
impl<E> ToElements<E> for Contextwhere
E: StarkField,
Source§fn to_elements(&self) -> Vec<E>
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].