Skip to main content

FoundryCfg

Trait FoundryCfg 

pub trait FoundryCfg:
    Cfg
    + Clone
    + From<CfgEnv<Self::Spec>>
    + Into<CfgEnv<Self::Spec>>
where Self::Spec: Into<SpecId> + Copy + Debug,
{ // Required methods fn cfg_env(&self) -> &CfgEnv<Self::Spec>; fn cfg_env_mut(&mut self) -> &mut CfgEnv<Self::Spec>; // Provided method fn set_spec_and_gas_params(&mut self, spec: Self::Spec) { ... } }
Expand description

Access to a configuration’s underlying environment and hardfork updates.

Required Methods§

fn cfg_env(&self) -> &CfgEnv<Self::Spec>

Reference to the underlying configuration.

fn cfg_env_mut(&mut self) -> &mut CfgEnv<Self::Spec>

Mutable reference to the underlying configuration.

Provided Methods§

fn set_spec_and_gas_params(&mut self, spec: Self::Spec)

Updates the hardfork and its gas parameters.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

§

impl FoundryCfg for MonadCfgEnv

Available on crate feature monad only.
§

fn cfg_env(&self) -> &CfgEnv<<MonadCfgEnv as Cfg>::Spec>

§

fn cfg_env_mut(&mut self) -> &mut CfgEnv<<MonadCfgEnv as Cfg>::Spec>

§

fn set_spec_and_gas_params(&mut self, spec: <MonadCfgEnv as Cfg>::Spec)

Implementors§

§

impl<SPEC> FoundryCfg for CfgEnv<SPEC>
where SPEC: Into<SpecId> + Copy + Debug,