pub struct CustomConstantCostRules { /* private fields */ }
Expand description
This type provides the functionality of ConstantCostRules
.
This implementation of Rules
will also check the WASM module for
instructions that are not supported by Gear Protocol.
Implementations§
Trait Implementations§
Source§impl Default for CustomConstantCostRules
impl Default for CustomConstantCostRules
Source§impl Rules for CustomConstantCostRules
impl Rules for CustomConstantCostRules
Source§fn instruction_cost(&self, instruction: &Instruction) -> Option<u32>
fn instruction_cost(&self, instruction: &Instruction) -> Option<u32>
Returns the cost for the passed
instruction
. Read moreSource§fn memory_grow_cost(&self) -> MemoryGrowCost
fn memory_grow_cost(&self) -> MemoryGrowCost
Returns the costs for growing the memory using the
memory.grow
instruction. Read moreSource§fn call_per_local_cost(&self) -> u32
fn call_per_local_cost(&self) -> u32
A surcharge cost to calling a function that is added per local variable of the function.
Auto Trait Implementations§
impl Freeze for CustomConstantCostRules
impl RefUnwindSafe for CustomConstantCostRules
impl Send for CustomConstantCostRules
impl Sync for CustomConstantCostRules
impl Unpin for CustomConstantCostRules
impl UnwindSafe for CustomConstantCostRules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more