pub struct TraceTableFragment<'a, B: StarkField> { /* private fields */ }
Expand description

A set of consecutive rows of an execution trace.

An execution trace fragment is a “view” into the specific execution trace. Updating data in the fragment, directly updates the data in the underlying execution trace.

A fragment cannot be instantiated directly but is created by executing TraceTable::fragments() method.

A fragment always contains contiguous rows, and the number of rows is guaranteed to be a power of two.

Implementations

Returns the index of this fragment.

Returns the step at which the fragment starts in the context of the original execution trace.

Returns the number of rows in this execution trace fragment.

Returns the width of the fragment (same as the width of the underlying execution trace).

Fills all rows in the fragment.

The rows are filled by executing the provided closures as follows:

  • init closure is used to initialize the first row of the fragment; it receives a mutable reference to the first state initialized to all zeros. Contents of the state are copied into the first row of the fragment after the closure returns.
  • update closure is used to populate all subsequent rows of the fragment; it receives two parameters:
    • index of the last updated row (starting with 0).
    • a mutable reference to the last updated state; the contents of the state are copied into the next row of the fragment after the closure returns.

Updates a single row in the fragment with provided data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.