pub enum MemoryGrowCost {
Free,
Linear(NonZeroU32),
}
Expand description
Dynamic costs for memory growth.
Variants§
Free
Skip per page charge.
Note
This makes sense when the amount of pages that a module is allowed to use is limited
to a rather small number by static validation. In that case it is viable to
benchmark the costs of memory.grow
as the worst case (growing to to the maximum
number of pages).
Linear(NonZeroU32)
Charge the specified amount for each page that the memory is grown by.
Trait Implementations§
source§impl Clone for MemoryGrowCost
impl Clone for MemoryGrowCost
source§fn clone(&self) -> MemoryGrowCost
fn clone(&self) -> MemoryGrowCost
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more