Struct move_core_types::gas_schedule::InternalGasUnits [−][src]
pub struct InternalGasUnits<GasCarrier>(_);
Expand description
Units of gas used within the Move VM, scaled for fine-grained accounting.
Trait Implementations
impl<'de, GasCarrier> Deserialize<'de> for InternalGasUnits<GasCarrier> where
GasCarrier: Deserialize<'de>,
impl<'de, GasCarrier> Deserialize<'de> for InternalGasUnits<GasCarrier> where
GasCarrier: Deserialize<'de>,
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
Project a value into the gas algebra.
Get the carrier.
Map a function f
of one argument over the underlying data.
fn map2<F: Fn(GasCarrier, GasCarrier) -> GasCarrier>(
self,
other: impl GasAlgebra<GasCarrier>,
f: F
) -> Self
fn map2<F: Fn(GasCarrier, GasCarrier) -> GasCarrier>(
self,
other: impl GasAlgebra<GasCarrier>,
f: F
) -> Self
Map a function f
of two arguments over the underlying carrier. Note that this function
can take two different implementations of the trait – one for self
the other for the
second argument. But, we enforce that they have the same underlying carrier. Read more
fn app<T, F: Fn(GasCarrier, GasCarrier) -> T>(
&self,
other: &impl GasAlgebra<GasCarrier>,
f: F
) -> T
fn app<T, F: Fn(GasCarrier, GasCarrier) -> T>(
&self,
other: &impl GasAlgebra<GasCarrier>,
f: F
) -> T
Apply a function f
of two arguments to the carrier. Since f
is not an endomorphism, we
return the resulting value, as opposed to the result wrapped up in ourselves. Read more
We allow casting between GasAlgebras as long as they have the same underlying carrier – i.e. they use the same type to store the underlying value. Read more
Add the two GasAlgebra
s together.
Subtract one GasAlgebra
from the other.
Multiply two GasAlgebra
s together.
Divide one GasAlgebra
by the other.
impl<GasCarrier: PartialEq> PartialEq<InternalGasUnits<GasCarrier>> for InternalGasUnits<GasCarrier>
impl<GasCarrier: PartialEq> PartialEq<InternalGasUnits<GasCarrier>> for InternalGasUnits<GasCarrier>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<GasCarrier> RefUnwindSafe for InternalGasUnits<GasCarrier> where
GasCarrier: RefUnwindSafe,
impl<GasCarrier> Send for InternalGasUnits<GasCarrier> where
GasCarrier: Send,
impl<GasCarrier> Sync for InternalGasUnits<GasCarrier> where
GasCarrier: Sync,
impl<GasCarrier> Unpin for InternalGasUnits<GasCarrier> where
GasCarrier: Unpin,
impl<GasCarrier> UnwindSafe for InternalGasUnits<GasCarrier> where
GasCarrier: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more