Skip to main content

CheatcodesBackend

Trait CheatcodesBackend 

Source
pub trait CheatcodesBackend<FEN: FoundryEvmNetwork> {
    // Required methods
    fn backend(&self) -> &Backend<FEN>;
    fn backend_mut(&mut self) -> &mut Backend<FEN>;
}
Expand description

Backend access of the cheatcode inspector while an execution runs.

Implemented for Backend and CowBackend, so fuzzed calls keep their lazy copy-on-write clone: read-only cheatcodes never clone the backend.

Required Methods§

Source

fn backend(&self) -> &Backend<FEN>

Returns the backend for reading.

Source

fn backend_mut(&mut self) -> &mut Backend<FEN>

Returns the backend for modification.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<FEN: FoundryEvmNetwork> CheatcodesBackend<FEN> for Backend<FEN>

Source§

fn backend(&self) -> &Self

Source§

fn backend_mut(&mut self) -> &mut Self

Source§

impl<FEN: FoundryEvmNetwork> CheatcodesBackend<FEN> for CowBackend<'_, FEN>

Source§

fn backend(&self) -> &Backend<FEN>

Source§

fn backend_mut(&mut self) -> &mut Backend<FEN>

Implementors§