pub struct Injector {
pub global_name: &'static str,
}
Expand description
Injects a mutable global variable and a local function to the module to track current gas left.
The function is called in every metering block. In case of falling out of gas, the global is
set to the sentinel value U64::MAX
and unreachable
instruction is called. The execution
engine should take care of getting the current global value and setting it back in order to
sync the gas left value during an execution.
Fields§
§global_name: &'static str
The export name of the gas tracking global.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Injector
impl RefUnwindSafe for Injector
impl Send for Injector
impl Sync for Injector
impl Unpin for Injector
impl UnwindSafe for Injector
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