pub enum OperatorCostStrategy {
Table(Box<OperatorCost>),
Default,
}Expand description
The cost of each operator.
Note: a more dynamic approach (e.g. a user-supplied callback) can be added as a variant in the future if needed.
Variants§
Table(Box<OperatorCost>)
A table of operator costs.
Default
Each cost defaults to 1 fuel unit, except Nop, Drop and
a few control flow operators.
Implementations§
Trait Implementations§
Source§impl Clone for OperatorCostStrategy
impl Clone for OperatorCostStrategy
Source§fn clone(&self) -> OperatorCostStrategy
fn clone(&self) -> OperatorCostStrategy
Returns a duplicate 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 OperatorCostStrategy
impl Debug for OperatorCostStrategy
Source§impl Default for OperatorCostStrategy
impl Default for OperatorCostStrategy
Source§fn default() -> OperatorCostStrategy
fn default() -> OperatorCostStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OperatorCostStrategy
impl<'de> Deserialize<'de> for OperatorCostStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for OperatorCostStrategy
impl Hash for OperatorCostStrategy
Source§impl PartialEq for OperatorCostStrategy
impl PartialEq for OperatorCostStrategy
Source§impl Serialize for OperatorCostStrategy
impl Serialize for OperatorCostStrategy
impl Eq for OperatorCostStrategy
impl StructuralPartialEq for OperatorCostStrategy
Auto Trait Implementations§
impl Freeze for OperatorCostStrategy
impl RefUnwindSafe for OperatorCostStrategy
impl Send for OperatorCostStrategy
impl Sync for OperatorCostStrategy
impl Unpin for OperatorCostStrategy
impl UnwindSafe for OperatorCostStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.