pub struct GasMeter { /* private fields */ }
Expand description
Struct to keep track of gas usage
Implementations
Creates a new GasMeter
with given gas limits
Deduct specified amount of gas from the meter
Create a new limited GasMeter
.
If limit
parameter is 0
, default limit is assumed that satisfies
the requirement for obligatory gas reserve (Self::RESERVE_PERCENTAGE
of the gas left).
The limit provided cannot exceed the gas left, if that happens the
total amount of gas is used as limit.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GasMeter
impl UnwindSafe for GasMeter
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
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