Struct evm::backend::MemoryBackend [−][src]
Memory backend, storing all state values in a BTreeMap
in memory.
Implementations
impl<'vicinity> MemoryBackend<'vicinity>
[src]
pub fn new(
vicinity: &'vicinity MemoryVicinity,
state: BTreeMap<H160, MemoryAccount>
) -> Self
[src]
vicinity: &'vicinity MemoryVicinity,
state: BTreeMap<H160, MemoryAccount>
) -> Self
Create a new memory backend.
pub fn state(&self) -> &BTreeMap<H160, MemoryAccount>
[src]
Get the underlying BTreeMap
storing the state.
Trait Implementations
impl<'vicinity> ApplyBackend for MemoryBackend<'vicinity>
[src]
fn apply<A, I, L>(&mut self, values: A, logs: L, delete_empty: bool) where
A: IntoIterator<Item = Apply<I>>,
I: IntoIterator<Item = (H256, H256)>,
L: IntoIterator<Item = Log>,
[src]
A: IntoIterator<Item = Apply<I>>,
I: IntoIterator<Item = (H256, H256)>,
L: IntoIterator<Item = Log>,
impl<'vicinity> Backend for MemoryBackend<'vicinity>
[src]
fn gas_price(&self) -> U256
[src]
fn origin(&self) -> H160
[src]
fn block_hash(&self, number: U256) -> H256
[src]
fn block_number(&self) -> U256
[src]
fn block_coinbase(&self) -> H160
[src]
fn block_timestamp(&self) -> U256
[src]
fn block_difficulty(&self) -> U256
[src]
fn block_gas_limit(&self) -> U256
[src]
fn chain_id(&self) -> U256
[src]
fn exists(&self, address: H160) -> bool
[src]
fn basic(&self, address: H160) -> Basic
[src]
fn code(&self, address: H160) -> Vec<u8>
[src]
fn storage(&self, address: H160, index: H256) -> H256
[src]
fn original_storage(&self, address: H160, index: H256) -> Option<H256>
[src]
impl<'vicinity> Clone for MemoryBackend<'vicinity>
[src]
fn clone(&self) -> MemoryBackend<'vicinity>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'vicinity> Debug for MemoryBackend<'vicinity>
[src]
Auto Trait Implementations
impl<'vicinity> RefUnwindSafe for MemoryBackend<'vicinity>
impl<'vicinity> Send for MemoryBackend<'vicinity>
impl<'vicinity> Sync for MemoryBackend<'vicinity>
impl<'vicinity> Unpin for MemoryBackend<'vicinity>
impl<'vicinity> UnwindSafe for MemoryBackend<'vicinity>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,