Struct VariableOperatorCost
pub struct VariableOperatorCost {Show 16 fields
pub memory_copy_per_byte: u8,
pub memory_fill_per_byte: u8,
pub memory_init_per_byte: u8,
pub memory_grow_per_page: u8,
pub table_copy_per_element: u8,
pub table_fill_per_element: u8,
pub table_init_per_element: u8,
pub table_grow_per_element: u8,
pub array_copy_per_element: u8,
pub array_fill_per_element: u8,
pub array_new_data_per_element: u8,
pub array_init_data_per_element: u8,
pub array_new_elem_per_element: u8,
pub array_init_elem_per_element: u8,
pub array_new_default_per_element: u8,
pub array_new_per_element: u8,
}Expand description
Fuel costs for operators whose work is proportional to a runtime operand.
These costs are charged in addition to the corresponding flat cost in
OperatorCost.
Fields§
§memory_copy_per_byte: u8Cost per byte copied by memory.copy.
memory_fill_per_byte: u8Cost per byte written by memory.fill.
memory_init_per_byte: u8Cost per byte copied by memory.init.
memory_grow_per_page: u8Cost per page requested by memory.grow.
table_copy_per_element: u8Cost per element copied by table.copy.
table_fill_per_element: u8Cost per element written by table.fill.
table_init_per_element: u8Cost per element copied by table.init.
table_grow_per_element: u8Cost per element requested by table.grow.
array_copy_per_element: u8Cost per element copied by array.copy.
array_fill_per_element: u8Cost per element written by array.fill.
array_new_data_per_element: u8Cost per element initialized by array.new_data.
array_init_data_per_element: u8Cost per element initialized by array.init_data.
array_new_elem_per_element: u8Cost per element initialized by array.new_elem.
array_init_elem_per_element: u8Cost per element initialized by array.init_elem.
array_new_default_per_element: u8Cost per element initialized by array.new_default.
array_new_per_element: u8Cost per element initialized by array.new.
Implementations§
§impl VariableOperatorCost
impl VariableOperatorCost
pub const fn new() -> VariableOperatorCost
pub const fn new() -> VariableOperatorCost
Creates the default variable-cost table.
Trait Implementations§
§impl Clone for VariableOperatorCost
impl Clone for VariableOperatorCost
§fn clone(&self) -> VariableOperatorCost
fn clone(&self) -> VariableOperatorCost
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for VariableOperatorCost
impl Debug for VariableOperatorCost
§impl Default for VariableOperatorCost
impl Default for VariableOperatorCost
§fn default() -> VariableOperatorCost
fn default() -> VariableOperatorCost
§impl<'de> Deserialize<'de> for VariableOperatorCost
impl<'de> Deserialize<'de> for VariableOperatorCost
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VariableOperatorCost, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VariableOperatorCost, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for VariableOperatorCost
§impl Hash for VariableOperatorCost
impl Hash for VariableOperatorCost
§impl PartialEq for VariableOperatorCost
impl PartialEq for VariableOperatorCost
§fn eq(&self, other: &VariableOperatorCost) -> bool
fn eq(&self, other: &VariableOperatorCost) -> bool
self and other values to be equal, and is used by ==.§impl Serialize for VariableOperatorCost
impl Serialize for VariableOperatorCost
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for VariableOperatorCost
Auto Trait Implementations§
impl Freeze for VariableOperatorCost
impl RefUnwindSafe for VariableOperatorCost
impl Send for VariableOperatorCost
impl Sync for VariableOperatorCost
impl Unpin for VariableOperatorCost
impl UnsafeUnpin for VariableOperatorCost
impl UnwindSafe for VariableOperatorCost
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more