Type Alias EvmEnvFor

pub type EvmEnvFor<Evm> = EvmEnv<<<<Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>;
Available on crate feature evm only.
Expand description

Type alias for EvmEnv for a given ConfigureEvm.

Aliased Type§

struct EvmEnvFor<Evm> {
    pub cfg_env: CfgEnv<<<<Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>,
    pub block_env: BlockEnv,
}

Fields§

§cfg_env: CfgEnv<<<<Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>

The configuration environment with handler settings

§block_env: BlockEnv

The block environment containing block-specific data

Layout§

Note: Encountered an error during type layout; the type failed to be normalized.

Implementations

§

impl<Spec> EvmEnv<Spec>

pub const fn new(cfg_env: CfgEnv<Spec>, block_env: BlockEnv) -> EvmEnv<Spec>

Create a new EvmEnv from its components.

§Arguments
  • cfg_env_with_handler_cfg - The configuration environment with handler settings
  • block - The block environment containing block-specific data

pub const fn block_env(&self) -> &BlockEnv

Returns a reference to the block environment.

pub const fn cfg_env(&self) -> &CfgEnv<Spec>

Returns a reference to the configuration environment.

pub const fn spec_id(&self) -> &Spec

Returns the spec id of the chain

Trait Implementations

§

impl<Spec> Clone for EvmEnv<Spec>
where Spec: Clone,

§

fn clone(&self) -> EvmEnv<Spec>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Spec> Debug for EvmEnv<Spec>
where Spec: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<Spec> Default for EvmEnv<Spec>
where Spec: Default,

§

fn default() -> EvmEnv<Spec>

Returns the “default value” for a type. Read more
§

impl<Spec> From<(CfgEnv<Spec>, BlockEnv)> for EvmEnv<Spec>

§

fn from(_: (CfgEnv<Spec>, BlockEnv)) -> EvmEnv<Spec>

Converts to this type from the input type.