pub struct Preamble {
    pub witnesses: usize,
    pub constraints: usize,
    pub config: Config,
}
Expand description

Metadata information of the CDF file

Fields

witnesses: usize

Witnesses count

constraints: usize

Constraints count

config: Config

Configuration parameters for encoding and decoding

Implementations

Serialized length

Default preamble

Create a new preamble instance.

Set the witnesses count

Set the constraints count

Set the configuration parameters

Witness offset in CDF, from an index

Constraint offset in CDF, from an index

Cache starting position

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

Returns the “default value” for a type. Read more

Configuration for the serialization and deserialization

A zeroed/default instance of the type.

Serializable length Read more

Write the type into the buffer. Read more

Deserialize the type from a given buffer Read more

Perform the internal validations of the associated element

Assert the buffer is big enough to store the type

Serialize the object into a bytes array.

Create a new instance of the type from the provided buffer

Write an element from the buffer, and return the remainder bytes Read more

Write an element from the buffer, and return the remainder bytes Read more

Read an element into the buffer, returning the remainder bytes Read more

Send the bytes representation of an element to a writer

Fetch a new element from a context

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

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.