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>
impl<E> EmptyDBTyped<E>
pub fn new() -> EmptyDBTyped<E>
Trait Implementations
§impl<E> Clone for EmptyDBTyped<E>
impl<E> Clone for EmptyDBTyped<E>
§fn clone(&self) -> 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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<E> Database for EmptyDBTyped<E>where
E: DBErrorMarker + Error,
impl<E> Database for EmptyDBTyped<E>where
E: DBErrorMarker + Error,
§fn basic(
&mut self,
address: Address,
) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as Database>::Error>
fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as Database>::Error>
Gets basic account information.
§fn code_by_hash(
&mut self,
code_hash: FixedBytes<32>,
) -> Result<Bytecode, <EmptyDBTyped<E> as Database>::Error>
fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <EmptyDBTyped<E> as Database>::Error>
Gets account code by its hash.
§fn storage(
&mut self,
address: Address,
index: Uint<256, 4>,
) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as Database>::Error>
fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as Database>::Error>
Gets storage value of address at index.
§fn block_hash(
&mut self,
number: u64,
) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as Database>::Error>
fn block_hash( &mut self, number: u64, ) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as Database>::Error>
Gets block hash by block number.
§impl<E> DatabaseRef for EmptyDBTyped<E>where
E: DBErrorMarker + Error,
impl<E> DatabaseRef for EmptyDBTyped<E>where
E: DBErrorMarker + Error,
§fn basic_ref(
&self,
_address: Address,
) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as DatabaseRef>::Error>
fn basic_ref( &self, _address: Address, ) -> Result<Option<AccountInfo>, <EmptyDBTyped<E> as DatabaseRef>::Error>
Gets basic account information.
§fn code_by_hash_ref(
&self,
_code_hash: FixedBytes<32>,
) -> Result<Bytecode, <EmptyDBTyped<E> as DatabaseRef>::Error>
fn code_by_hash_ref( &self, _code_hash: FixedBytes<32>, ) -> Result<Bytecode, <EmptyDBTyped<E> as DatabaseRef>::Error>
Gets account code by its hash.
§fn storage_ref(
&self,
_address: Address,
_index: Uint<256, 4>,
) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as DatabaseRef>::Error>
fn storage_ref( &self, _address: Address, _index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <EmptyDBTyped<E> as DatabaseRef>::Error>
Gets storage value of address at index.
§fn block_hash_ref(
&self,
number: u64,
) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as DatabaseRef>::Error>
fn block_hash_ref( &self, number: u64, ) -> Result<FixedBytes<32>, <EmptyDBTyped<E> as DatabaseRef>::Error>
Gets block hash by block number.
§impl<E> Debug for EmptyDBTyped<E>
impl<E> Debug for EmptyDBTyped<E>
§impl<E> Default for EmptyDBTyped<E>
impl<E> Default for EmptyDBTyped<E>
§fn default() -> EmptyDBTyped<E>
fn default() -> EmptyDBTyped<E>
Returns the “default value” for a type. Read more
§impl<'de, E> Deserialize<'de> for EmptyDBTyped<E>
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>,
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>
impl<E> PartialEq for EmptyDBTyped<E>
§impl<E> Serialize for EmptyDBTyped<E>
impl<E> Serialize for EmptyDBTyped<E>
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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