[][src]Struct rchain_v1::rchain::Account

pub struct Account {
    store: HashMap<String, String>,
    acc_type: AccountType,
    tokens: u128,
}

Represents an account on the blockchain This is basically the primary part of the "world state" of the blockchain It is the final status after performing all blocks in order

Fields

store: HashMap<String, String>

We want the account to be able to store any information we want (Dictionary)

acc_type: AccountType

store if this is a user account or sth else

tokens: u128

Amount of tokens that account owns (like BTC or ETH)

Methods

impl Account[src]

pub fn new(account_type: AccountType) -> Self[src]

Constructor

Trait Implementations

impl Clone for Account[src]

impl Debug for Account[src]

Auto Trait Implementations

impl RefUnwindSafe for Account

impl Send for Account

impl Sync for Account

impl Unpin for Account

impl UnwindSafe for Account

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.