loom_evm_db::database_loom

Trait DatabaseLoomExt

Source
pub trait DatabaseLoomExt {
    // Required methods
    fn with_ext_db(
        &mut self,
        db: impl DatabaseRef<Error = ErrReport> + Send + Sync + 'static,
    );
    fn is_account(&self, address: &Address) -> bool;
    fn is_slot(&self, address: &Address, slot: &U256) -> bool;
    fn contracts_len(&self) -> usize;
    fn accounts_len(&self) -> usize;
    fn storage_len(&self) -> usize;
    fn load_account(&mut self, address: Address) -> Result<&mut FastDbAccount>;
    fn load_cached_account(
        &mut self,
        address: Address,
    ) -> Result<&mut FastDbAccount>;
    fn insert_contract(&mut self, account: &mut AccountInfo);
    fn insert_account_info(&mut self, address: Address, info: AccountInfo);
    fn insert_account_storage(
        &mut self,
        address: Address,
        slot: U256,
        value: U256,
    ) -> Result<()>;
    fn replace_account_storage(
        &mut self,
        address: Address,
        storage: HashMap<U256, U256>,
    ) -> Result<()>;
}

Required Methods§

Source

fn with_ext_db( &mut self, db: impl DatabaseRef<Error = ErrReport> + Send + Sync + 'static, )

Source

fn is_account(&self, address: &Address) -> bool

Source

fn is_slot(&self, address: &Address, slot: &U256) -> bool

Source

fn contracts_len(&self) -> usize

Source

fn accounts_len(&self) -> usize

Source

fn storage_len(&self) -> usize

Source

fn load_account(&mut self, address: Address) -> Result<&mut FastDbAccount>

Source

fn load_cached_account( &mut self, address: Address, ) -> Result<&mut FastDbAccount>

Source

fn insert_contract(&mut self, account: &mut AccountInfo)

Source

fn insert_account_info(&mut self, address: Address, info: AccountInfo)

Source

fn insert_account_storage( &mut self, address: Address, slot: U256, value: U256, ) -> Result<()>

Source

fn replace_account_storage( &mut self, address: Address, storage: HashMap<U256, U256>, ) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§