Struct wasmer_types::FastGasCounter
source · [−]#[repr(C)]pub struct FastGasCounter {
pub burnt_gas: u64,
pub gas_limit: u64,
pub opcode_cost: u64,
}
Expand description
Fast gas counter with very simple structure, could be exposed to compiled code in the VM.
Fields
burnt_gas: u64
The following three fields must be put next to another to make sure generated gas counting code can use and adjust them. We will share counter to ensure we never miss synchronization. This could change and in such a case synchronization required between compiled WASM code and the host code. The amount of gas that was irreversibly used for contract execution.
gas_limit: u64
Hard gas limit for execution
opcode_cost: u64
Single WASM opcode cost
Implementations
Trait Implementations
sourceimpl Clone for FastGasCounter
impl Clone for FastGasCounter
sourcefn clone(&self) -> FastGasCounter
fn clone(&self) -> FastGasCounter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FastGasCounter
impl Debug for FastGasCounter
sourceimpl Display for FastGasCounter
impl Display for FastGasCounter
sourceimpl PartialEq<FastGasCounter> for FastGasCounter
impl PartialEq<FastGasCounter> for FastGasCounter
sourcefn eq(&self, other: &FastGasCounter) -> bool
fn eq(&self, other: &FastGasCounter) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FastGasCounter) -> bool
fn ne(&self, other: &FastGasCounter) -> bool
This method tests for !=
.
impl Eq for FastGasCounter
impl StructuralEq for FastGasCounter
impl StructuralPartialEq for FastGasCounter
Auto Trait Implementations
impl RefUnwindSafe for FastGasCounter
impl Send for FastGasCounter
impl Sync for FastGasCounter
impl Unpin for FastGasCounter
impl UnwindSafe for FastGasCounter
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more