Struct ethcore::pod_account::PodAccount
source · [−]pub struct PodAccount {
pub balance: U256,
pub nonce: U256,
pub code: Option<Bytes>,
pub storage: BTreeMap<H256, H256>,
}
Expand description
An account, expressed as Plain-Old-Data (hence the name). Does not have a DB overlay cache, code hash or anything like that.
Fields
balance: U256
The balance of the account.
nonce: U256
The nonce of the account.
code: Option<Bytes>
The code of the account or None
in the special case that it is unknown.
storage: BTreeMap<H256, H256>
The storage of the account.
Implementations
sourceimpl PodAccount
impl PodAccount
sourcepub fn from_account(acc: &Account) -> PodAccount
pub fn from_account(acc: &Account) -> PodAccount
Convert Account to a PodAccount. NOTE: This will silently fail unless the account is fully cached.
sourcepub fn insert_additional(
&self,
db: &mut dyn HashDB<KeccakHasher, DBValue>,
factory: &TrieFactory<KeccakHasher, RlpCodec>
)
pub fn insert_additional(
&self,
db: &mut dyn HashDB<KeccakHasher, DBValue>,
factory: &TrieFactory<KeccakHasher, RlpCodec>
)
Place additional data into given hash DB.
Trait Implementations
sourceimpl Clone for PodAccount
impl Clone for PodAccount
sourcefn clone(&self) -> PodAccount
fn clone(&self) -> PodAccount
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PodAccount
impl Debug for PodAccount
sourceimpl Display for PodAccount
impl Display for PodAccount
sourceimpl PartialEq<PodAccount> for PodAccount
impl PartialEq<PodAccount> for PodAccount
sourcefn eq(&self, other: &PodAccount) -> bool
fn eq(&self, other: &PodAccount) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PodAccount) -> bool
fn ne(&self, other: &PodAccount) -> bool
This method tests for !=
.
sourceimpl Serialize for PodAccount
impl Serialize for PodAccount
impl Eq for PodAccount
impl StructuralEq for PodAccount
impl StructuralPartialEq for PodAccount
Auto Trait Implementations
impl RefUnwindSafe for PodAccount
impl Send for PodAccount
impl Sync for PodAccount
impl Unpin for PodAccount
impl UnwindSafe for PodAccount
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more