Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.07 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.07 KB

revm-delegate

Procedural macro to automatically delegate revm traits.

Features

Usage

use revm_delegate::revm_delegate;
use revm::{Database, DatabaseCommit, DatabaseRef, Inspector};

#[revm_delegate(Database to &mut self.db where DB: Database with { type Error = DB::Error; })]
#[revm_delegate(DatabaseCommit to &mut self.db where DB: DatabaseCommit)]
#[revm_delegate(DatabaseRef to &self.db where DB: DatabaseRef with { type Error = DB::Error; })]
struct WrapDatabase<DB> {
    db: DB,
}

#[revm_delegate(Inspector<DB> to &mut self.insp where DB: Database, INSP: Inspector<DB>)]
struct WrapInspector<INSP> {
    insp: INSP,
}

Note

Procedural macro auto-generated using delegate-trait.