pub enum MemoryGrowCost {
Free,
Linear(NonZero<u32>),
}
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(NonZero<u32>)
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 moreSource§impl Debug for MemoryGrowCost
impl Debug for MemoryGrowCost
Source§impl PartialEq for MemoryGrowCost
impl PartialEq for MemoryGrowCost
impl Copy for MemoryGrowCost
impl Eq for MemoryGrowCost
impl StructuralPartialEq for MemoryGrowCost
Auto Trait Implementations§
impl Freeze for MemoryGrowCost
impl RefUnwindSafe for MemoryGrowCost
impl Send for MemoryGrowCost
impl Sync for MemoryGrowCost
impl Unpin for MemoryGrowCost
impl UnwindSafe for MemoryGrowCost
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