pub(crate) trait Cheatcode: CheatcodeDef + DynCheatcode {
// Provided methods
fn apply(&self, state: &mut Cheatcodes) -> Result { ... }
fn apply_stateful(&self, ccx: &mut CheatsCtxt<'_, '_, '_, '_>) -> Result { ... }
fn apply_full(
&self,
ccx: &mut CheatsCtxt<'_, '_, '_, '_>,
executor: &mut dyn CheatcodesExecutor,
) -> Result { ... }
}
Expand description
Cheatcode implementation.
Provided Methods§
Sourcefn apply(&self, state: &mut Cheatcodes) -> Result
fn apply(&self, state: &mut Cheatcodes) -> Result
Applies this cheatcode to the given state.
Implement this function if you don’t need access to the EVM data.
Sourcefn apply_stateful(&self, ccx: &mut CheatsCtxt<'_, '_, '_, '_>) -> Result
fn apply_stateful(&self, ccx: &mut CheatsCtxt<'_, '_, '_, '_>) -> Result
Applies this cheatcode to the given context.
Implement this function if you need access to the EVM data.
Sourcefn apply_full(
&self,
ccx: &mut CheatsCtxt<'_, '_, '_, '_>,
executor: &mut dyn CheatcodesExecutor,
) -> Result
fn apply_full( &self, ccx: &mut CheatsCtxt<'_, '_, '_, '_>, executor: &mut dyn CheatcodesExecutor, ) -> Result
Applies this cheatcode to the given context and executor.
Implement this function if you need access to the executor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.