Struct diem_sdk::move_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>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<InternalGasUnits<GasCarrier>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<InternalGasUnits<GasCarrier>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Project a value into the gas algebra.
Map a function f
of one argument over the underlying data.
fn map2<F>(self, other: impl GasAlgebra<GasCarrier>, f: F) -> Self where
F: Fn(GasCarrier, GasCarrier) -> GasCarrier,
fn map2<F>(self, other: impl GasAlgebra<GasCarrier>, f: F) -> Self where
F: Fn(GasCarrier, GasCarrier) -> GasCarrier,
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>(&self, other: &impl GasAlgebra<GasCarrier>, f: F) -> T where
F: Fn(GasCarrier, GasCarrier) -> T,
fn app<T, F>(&self, other: &impl GasAlgebra<GasCarrier>, f: F) -> T where
F: Fn(GasCarrier, GasCarrier) -> 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<InternalGasUnits<GasCarrier>> for InternalGasUnits<GasCarrier> where
GasCarrier: PartialEq<GasCarrier>,
impl<GasCarrier> PartialEq<InternalGasUnits<GasCarrier>> for InternalGasUnits<GasCarrier> where
GasCarrier: PartialEq<GasCarrier>,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generates a hash used only for tests.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more