pub struct StateDump {
pub root: B256,
pub accounts: BTreeMap<Address, AccountState>,
pub next: Option<Bytes>,
}Expand description
Represents a state dump, which includes the root hash of the state trie, Note: There are some differences in JSON serialization compared to geth’s output, such as:
- The root field in geth doesn’t have a 0x prefix, while here it does
- The balance field of accounts in geth is a decimal string, while here it’s a hexadecimal string
- The value field of storage in geth doesn’t have a 0x prefix, while here it does
Fields§
§root: B256The root hash of the state trie
accounts: BTreeMap<Address, AccountState>A map of accounts, indexed by address
next: Option<Bytes>Next can be set to represent that this dump is only partial, and Next is where an iterator should be positioned in order to continue the dump.
Note: this uses base64 because this is based on the default go-ethereum behaviour that by default serializes in base64 https://github.com/ethereum/go-ethereum/blob/85077be58edea572f29c3b1a6a055077f1a56a8b/core/state/dump.go#L66-L68
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StateDump
impl<'de> Deserialize<'de> for StateDump
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StateDump
impl StructuralPartialEq for StateDump
Auto Trait Implementations§
impl !Freeze for StateDump
impl RefUnwindSafe for StateDump
impl Send for StateDump
impl Sync for StateDump
impl Unpin for StateDump
impl UnwindSafe for StateDump
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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: 88 bytes