Struct near_parameters::cost::ExtCostsConfig
source · pub struct ExtCostsConfig {
pub costs: EnumMap<ExtCosts, ParameterCost>,
}
Fields§
§costs: EnumMap<ExtCosts, ParameterCost>
Implementations§
source§impl ExtCostsConfig
impl ExtCostsConfig
pub fn gas_cost(&self, param: ExtCosts) -> Gas
pub fn compute_cost(&self, param: ExtCosts) -> Compute
sourcepub fn test_with_undercharging_factor(factor: u64) -> ExtCostsConfig
pub fn test_with_undercharging_factor(factor: u64) -> ExtCostsConfig
Convenience constructor to use in tests where the exact gas cost does not need to correspond to a specific protocol version.
sourcepub fn test() -> ExtCostsConfig
pub fn test() -> ExtCostsConfig
test_with_undercharging_factor
with a factor of 1.
Trait Implementations§
source§impl Clone for ExtCostsConfig
impl Clone for ExtCostsConfig
source§fn clone(&self) -> ExtCostsConfig
fn clone(&self) -> ExtCostsConfig
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 ExtCostsConfig
impl Debug for ExtCostsConfig
source§impl From<ExtCostsConfig> for ExtCostsConfigView
impl From<ExtCostsConfig> for ExtCostsConfigView
source§fn from(config: ExtCostsConfig) -> Self
fn from(config: ExtCostsConfig) -> Self
Converts to this type from the input type.
source§impl From<ExtCostsConfigView> for ExtCostsConfig
impl From<ExtCostsConfigView> for ExtCostsConfig
source§fn from(view: ExtCostsConfigView) -> Self
fn from(view: ExtCostsConfigView) -> Self
Converts to this type from the input type.
source§impl Hash for ExtCostsConfig
impl Hash for ExtCostsConfig
source§impl PartialEq for ExtCostsConfig
impl PartialEq for ExtCostsConfig
source§fn eq(&self, other: &ExtCostsConfig) -> bool
fn eq(&self, other: &ExtCostsConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ExtCostsConfig
impl StructuralEq for ExtCostsConfig
impl StructuralPartialEq for ExtCostsConfig
Auto Trait Implementations§
impl RefUnwindSafe for ExtCostsConfig
impl Send for ExtCostsConfig
impl Sync for ExtCostsConfig
impl Unpin for ExtCostsConfig
impl UnwindSafe for ExtCostsConfig
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
§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.