Struct evm::backend::MemoryBackend [−][src]
pub struct MemoryBackend<'vicinity> { /* fields omitted */ }Expand description
Memory backend, storing all state values in a BTreeMap in memory.
Implementations
impl<'vicinity> MemoryBackend<'vicinity>[src]
impl<'vicinity> MemoryBackend<'vicinity>[src]pub fn new(
vicinity: &'vicinity MemoryVicinity,
state: BTreeMap<H160, MemoryAccount>
) -> Self[src]
pub fn new(
vicinity: &'vicinity MemoryVicinity,
state: BTreeMap<H160, MemoryAccount>
) -> Self[src]Create a new memory backend.
pub fn state(&self) -> &BTreeMap<H160, MemoryAccount>[src]
pub fn state(&self) -> &BTreeMap<H160, MemoryAccount>[src]Get the underlying BTreeMap storing the state.
Trait Implementations
impl<'vicinity> ApplyBackend for MemoryBackend<'vicinity>[src]
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]
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]Apply given values and logs at backend.
impl<'vicinity> Backend for MemoryBackend<'vicinity>[src]
impl<'vicinity> Backend for MemoryBackend<'vicinity>[src]fn block_hash(&self, number: U256) -> H256[src]
fn block_hash(&self, number: U256) -> H256[src]Environmental block hash.
fn block_number(&self) -> U256[src]
fn block_number(&self) -> U256[src]Environmental block number.
fn block_coinbase(&self) -> H160[src]
fn block_coinbase(&self) -> H160[src]Environmental coinbase.
fn block_timestamp(&self) -> U256[src]
fn block_timestamp(&self) -> U256[src]Environmental block timestamp.
fn block_difficulty(&self) -> U256[src]
fn block_difficulty(&self) -> U256[src]Environmental block difficulty.
fn block_gas_limit(&self) -> U256[src]
fn block_gas_limit(&self) -> U256[src]Environmental block gas limit.
impl<'vicinity> Clone for MemoryBackend<'vicinity>[src]
impl<'vicinity> Clone for MemoryBackend<'vicinity>[src]fn clone(&self) -> MemoryBackend<'vicinity>[src]
fn clone(&self) -> MemoryBackend<'vicinity>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,