Struct fuel_vm::gas::DependentCost
source · pub struct DependentCost {
pub base: Word,
pub dep_per_unit: Word,
}
Expand description
Dependent cost is a cost that depends on the number of units.
The cost starts at the base and grows by dep_per_unit
for every unit.
For example, if the base is 10 and the dep_per_unit
is 2,
then the cost for 0 units is 10, 1 unit is 12, 2 units is 14, etc.
Fields§
§base: Word
The minimum that this operation can cost.
dep_per_unit: Word
The amount that this operation costs per increase in unit.
Implementations§
Trait Implementations§
source§impl Clone for DependentCost
impl Clone for DependentCost
source§fn clone(&self) -> DependentCost
fn clone(&self) -> DependentCost
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 DependentCost
impl Debug for DependentCost
source§impl Default for DependentCost
impl Default for DependentCost
source§fn default() -> DependentCost
fn default() -> DependentCost
Returns the “default value” for a type. Read more
source§impl PartialEq<DependentCost> for DependentCost
impl PartialEq<DependentCost> for DependentCost
source§fn eq(&self, other: &DependentCost) -> bool
fn eq(&self, other: &DependentCost) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DependentCost
impl Eq for DependentCost
impl StructuralEq for DependentCost
impl StructuralPartialEq for DependentCost
Auto Trait Implementations§
impl RefUnwindSafe for DependentCost
impl Send for DependentCost
impl Sync for DependentCost
impl Unpin for DependentCost
impl UnwindSafe for DependentCost
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more