pub struct TraceLayout { /* private fields */ }
Expand description

Layout of columns within an execution trace.

A layout describes how columns of a trace are arranged into segments. All execution traces must have a non-zero main segment, and may have additional auxiliary trace segments. Currently, the number of auxiliary trace segments is limited to one.

Additionally, a layout contains information on how many random elements are required to build a given auxiliary trace segment. This information is used to construct AuxTraceRandElements struct which is passed in as one of the parameters to Air::evaluate_aux_transition() and Air::get_aux_assertions() methods.

The number of random elements may be different from the number of columns in a given auxiliary segment. For example, an auxiliary segment may contain just one column, but may require many random elements.

Implementations

Returns a new TraceLayout instantiated with the provided info.

Panics

Panics if:

  • Width of the main trace segment is set to zero.
  • Sum of all segment widths exceeds 255.
  • A zero entry in auxiliary segment width array is followed by a non-zero entry.
  • Number of random elements for an auxiliary trace segment of non-zero width is set to zero.
  • Number of random elements for an auxiliary trace segment of zero width is set to non-zero.
  • Number of random elements for any auxiliary trace segment is greater than 255.

Returns the number of columns in the main segment of an execution trace.

This is guaranteed to be between 1 and 255.

Returns the number of columns in all auxiliary segments of an execution trace.

Returns the total number of segments in an execution trace.

Returns the number of auxiliary trace segments in an execution trace.

Returns the number of columns in the auxiliary trace segment at the specified index.

Returns the number of random elements required by the auxiliary trace segment at the specified index.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Reads TraceLayout from the specified source and returns the result.

Errors

Returns an error of a valid TraceLayout struct could not be read from the specified source.

Reads a sequence of bytes from the provided source, attempts to deserialize these bytes into a vector with the specified number of Self elements, and returns the result. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serializes self and writes the resulting bytes into the target.

Serializes self into a vector of bytes.
Serializes all elements of the source and writes these bytes into the target. Read more
Returns an estimate of how many bytes are needed to represent self. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.