revm_context_interface/
context.rs

1use crate::{Block, Cfg, Database, Journal, Transaction};
2use auto_impl::auto_impl;
3
4#[auto_impl(&mut, Box)]
5pub trait ContextTr {
6    type Block: Block;
7    type Tx: Transaction;
8    type Cfg: Cfg;
9    type Db: Database;
10    type Journal: Journal<Database = Self::Db>;
11    type Chain;
12
13    fn tx(&self) -> &Self::Tx;
14    fn block(&self) -> &Self::Block;
15    fn cfg(&self) -> &Self::Cfg;
16    fn journal(&mut self) -> &mut Self::Journal;
17    fn journal_ref(&self) -> &Self::Journal;
18    fn db(&mut self) -> &mut Self::Db;
19    fn db_ref(&self) -> &Self::Db;
20    fn chain(&mut self) -> &mut Self::Chain;
21    fn error(&mut self) -> &mut Result<(), <Self::Db as Database>::Error>;
22    fn tx_journal(&mut self) -> (&mut Self::Tx, &mut Self::Journal);
23}