Skip to main content

FoundryCfg

Trait FoundryCfg 

Source
pub trait FoundryCfg:
    Cfg<Spec: Into<SpecId> + Copy + Debug>
    + Clone
    + From<CfgEnv<Self::Spec>>
    + Into<CfgEnv<Self::Spec>> {
    // 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§

Source

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

Reference to the underlying configuration.

Source

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

Mutable reference to the underlying configuration.

Provided Methods§

Source

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§

Source§

impl FoundryCfg for MonadCfgEnv

Available on crate feature monad only.
Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn cfg_env(&self) -> &Self

Source§

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

Implementors§