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§
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<()>
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.