Struct TrieAccount
pub struct TrieAccount {
pub nonce: u64,
pub balance: Uint<256, 4>,
pub storage_root: FixedBytes<32>,
pub code_hash: FixedBytes<32>,
pub extension: AccountExtension,
}ethereum only.Expand description
Re-export for convenience. Represents an TrieAccount in the account trie.
Fields§
§nonce: u64The account’s nonce.
balance: Uint<256, 4>The account’s balance.
storage_root: FixedBytes<32>The hash of the storage account data.
code_hash: FixedBytes<32>The hash of the code of the account.
extension: AccountExtensionaccount-ext only.Raw chain-specific bytes, encoded as a fifth RLP string only when nonempty.
Implementations§
§impl TrieAccount
impl TrieAccount
pub const fn new(
nonce: u64,
balance: Uint<256, 4>,
storage_root: FixedBytes<32>,
code_hash: FixedBytes<32>,
) -> TrieAccount
pub const fn new( nonce: u64, balance: Uint<256, 4>, storage_root: FixedBytes<32>, code_hash: FixedBytes<32>, ) -> TrieAccount
Creates a trie account with an empty extension.
The extension carries chain-specific data and only exists with the account-ext feature.
Use with_extension to attach one.
pub fn with_extension(
self,
extension: impl Into<AccountExtension>,
) -> TrieAccount
Available on crate feature account-ext only.
pub fn with_extension( self, extension: impl Into<AccountExtension>, ) -> TrieAccount
account-ext only.Returns this trie account with the given chain-specific extension.
This replaces the extension, which Self::new leaves empty.
pub fn trie_hash_slow(&self) -> FixedBytes<32>
pub fn trie_hash_slow(&self) -> FixedBytes<32>
Compute hash as committed to in the MPT trie without memorizing.
Trait Implementations§
§impl<'arbitrary> Arbitrary<'arbitrary> for TrieAccount
impl<'arbitrary> Arbitrary<'arbitrary> for TrieAccount
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<TrieAccount, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<TrieAccount, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>,
) -> Result<TrieAccount, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary>, ) -> Result<TrieAccount, Error>
Self from the entirety of the given
unstructured data. Read more§impl Clone for TrieAccount
impl Clone for TrieAccount
§fn clone(&self) -> TrieAccount
fn clone(&self) -> TrieAccount
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TrieAccount
impl Debug for TrieAccount
§impl Decodable for TrieAccount
impl Decodable for TrieAccount
§fn decode(buf: &mut &[u8]) -> Result<TrieAccount, Error>
fn decode(buf: &mut &[u8]) -> Result<TrieAccount, Error>
buf must be advanced past
the decoded object.§impl Default for TrieAccount
impl Default for TrieAccount
§fn default() -> TrieAccount
fn default() -> TrieAccount
§impl<'de> Deserialize<'de> for TrieAccount
impl<'de> Deserialize<'de> for TrieAccount
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrieAccount, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TrieAccount, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Encodable for TrieAccount
impl Encodable for TrieAccount
impl Eq for TrieAccount
§impl From<GenesisAccount> for TrieAccount
impl From<GenesisAccount> for TrieAccount
§fn from(account: GenesisAccount) -> TrieAccount
fn from(account: GenesisAccount) -> TrieAccount
§impl PartialEq for TrieAccount
impl PartialEq for TrieAccount
§impl Serialize for TrieAccount
impl Serialize for TrieAccount
§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,
impl StructuralPartialEq for TrieAccount
Auto Trait Implementations§
impl Freeze for TrieAccount
impl RefUnwindSafe for TrieAccount
impl Send for TrieAccount
impl Sync for TrieAccount
impl Unpin for TrieAccount
impl UnsafeUnpin for TrieAccount
impl UnwindSafe for TrieAccount
Blanket Implementations§
impl<A> ArbInterop for A
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 112 bytes