Type Alias EmptyDB

pub type EmptyDB = EmptyDBTyped<Infallible>;
Expand description

An empty database that always returns default values when queried.

Aliased Type§

struct EmptyDB { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes

Implementations

§

impl<E> EmptyDBTyped<E>

pub fn new() -> EmptyDBTyped<E>

Trait Implementations

§

impl<E> Clone for EmptyDBTyped<E>

§

fn clone(&self) -> EmptyDBTyped<E>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<E> Database for EmptyDBTyped<E>

§

type Error = E

The database error type.
§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as Database>::Error>

Get basic account information.
§

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <EmptyDBTyped<E> as Database>::Error>

Get account code by its hash.
§

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as Database>::Error>

Get storage value of address at index.
§

fn block_hash( &mut self, number: u64, ) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as Database>::Error>

Get block hash by block number.
§

impl<E> DatabaseRef for EmptyDBTyped<E>

§

type Error = E

The database error type.
§

fn basic_ref( &self, _address: Address, ) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as DatabaseRef>::Error>

Get basic account information.
§

fn code_by_hash_ref( &self, _code_hash: FixedBytes<32>, ) -> Result<Bytecode, <EmptyDBTyped<E> as DatabaseRef>::Error>

Get account code by its hash.
§

fn storage_ref( &self, _address: Address, _index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as DatabaseRef>::Error>

Get storage value of address at index.
§

fn block_hash_ref( &self, number: u64, ) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as DatabaseRef>::Error>

Get block hash by block number.
§

impl<E> Debug for EmptyDBTyped<E>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<E> Default for EmptyDBTyped<E>

§

fn default() -> EmptyDBTyped<E>

Returns the “default value” for a type. Read more
§

impl<'de, E> Deserialize<'de> for EmptyDBTyped<E>

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<EmptyDBTyped<E>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<E> PartialEq for EmptyDBTyped<E>

§

fn eq(&self, _: &EmptyDBTyped<E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<E> Serialize for EmptyDBTyped<E>

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<E> Copy for EmptyDBTyped<E>

§

impl<E> Eq for EmptyDBTyped<E>