pub struct Schedule {
    pub version: u32,
    pub regular_op_cost: Gas,
    pub grow_mem_cost: Gas,
    pub max_stack_height: u32,
    pub max_table_size: u32,
    pub max_memory_pages: u32,
    pub has_forbidden_floats: bool,
    pub has_grow_cost: bool,
    pub has_metering: bool,
    pub has_table_size_limit: bool,
    pub per_type_op_cost: HashMap<String, u32>,
}
Expand description

Definition of the cost schedule and other parameterizations for wasm vm.

Fields

version: u32

Version of the schedule.

regular_op_cost: Gas

Gas cost of a regular operation.

grow_mem_cost: Gas

Gas cost of a growing memory by single page.

max_stack_height: u32

Maximum allowed stack height.

See <https://wiki.parity.io/WebAssembly-StackHeight> to find out how the stack frame cost is calculated.

max_table_size: u32

Maximum allowed size of a declared table.

max_memory_pages: u32

Maximum number of memory pages.

has_forbidden_floats: bool

Floats are forbidden

has_grow_cost: bool

Cost of memory growth

has_metering: bool

Is metering on

has_table_size_limit: bool

Is table size limit on

per_type_op_cost: HashMap<String, u32>

Op cost bit

Implementations

Create schedule with version

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Return a reference to the key of the leaf type

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more