Struct cfx_rpc_eth_types::EvmOverrides
source · pub struct EvmOverrides {
pub state: Option<StateOverride>,
pub block: Option<Box<BlockOverrides>>,
}
Expand description
Helper type that bundles various overrides for EVM Execution.
By Default
, no overrides are included.
Fields§
§state: Option<StateOverride>
Applies overrides to the state before execution.
block: Option<Box<BlockOverrides>>
Applies overrides to the block before execution.
This is a Box
because less common and only available in debug trace
endpoints.
Implementations§
source§impl EvmOverrides
impl EvmOverrides
sourcepub const fn new(
state: Option<StateOverride>,
block: Option<Box<BlockOverrides>>
) -> Self
pub const fn new( state: Option<StateOverride>, block: Option<Box<BlockOverrides>> ) -> Self
Creates a new instance with the given overrides
sourcepub const fn state(state: Option<StateOverride>) -> Self
pub const fn state(state: Option<StateOverride>) -> Self
Creates a new instance with the given state overrides.
sourcepub const fn block(block: Option<Box<BlockOverrides>>) -> Self
pub const fn block(block: Option<Box<BlockOverrides>>) -> Self
Creates a new instance with the given block overrides.
pub const fn is_none(&self) -> bool
sourcepub fn with_state(self, state: StateOverride) -> Self
pub fn with_state(self, state: StateOverride) -> Self
Adds state overrides to an existing instance.
sourcepub fn with_block(self, block: Box<BlockOverrides>) -> Self
pub fn with_block(self, block: Box<BlockOverrides>) -> Self
Adds block overrides to an existing instance.
Trait Implementations§
source§impl Clone for EvmOverrides
impl Clone for EvmOverrides
source§fn clone(&self) -> EvmOverrides
fn clone(&self) -> EvmOverrides
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EvmOverrides
impl Debug for EvmOverrides
source§impl Default for EvmOverrides
impl Default for EvmOverrides
source§fn default() -> EvmOverrides
fn default() -> EvmOverrides
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for EvmOverrides
impl Send for EvmOverrides
impl Sync for EvmOverrides
impl Unpin for EvmOverrides
impl UnwindSafe for EvmOverrides
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