[][src]Enum nanocurrency_types::BlockInner

pub enum BlockInner {
    Send {
        previous: BlockHash,
        destination: Account,
        balance: u128,
    },
    Receive {
        previous: BlockHash,
        source: BlockHash,
    },
    Open {
        source: BlockHash,
        representative: Account,
        account: Account,
    },
    Change {
        previous: BlockHash,
        representative: Account,
    },
    State {
        account: Account,
        previous: BlockHash,
        representative: Account,
        balance: u128,
        link: [u8; 32],
    },
}

Variants

Send

Fields of Send

previous: BlockHashdestination: Accountbalance: u128

The balance of the account after the send.

Receive

Fields of Receive

previous: BlockHashsource: BlockHash

The block we're receiving.

Open

The first "receive" in an account chain. Creates the account, and sets the representative.

Fields of Open

source: BlockHash

The block we're receiving.

representative: Accountaccount: Account
Change

Changes the representative for an account.

Fields of Change

previous: BlockHashrepresentative: Account
State

A universal transaction which contains the account state.

Fields of State

account: Accountprevious: BlockHashrepresentative: Accountbalance: u128link: [u8; 32]

Link field contains source block_hash if receiving, destination account if sending

Implementations

impl BlockInner[src]

pub fn get_hash(&self) -> BlockHash[src]

pub fn previous(&self) -> Option<&BlockHash>[src]

pub fn root_bytes(&self) -> &[u8; 32][src]

pub fn into_root(self) -> BlockRoot[src]

pub fn ty(&self) -> BlockType[src]

pub fn size(&self) -> usize[src]

Trait Implementations

impl Clone for BlockInner[src]

impl Debug for BlockInner[src]

impl<'de> Deserialize<'de> for BlockInner[src]

impl Eq for BlockInner[src]

impl Hash for BlockInner[src]

impl PartialEq<BlockInner> for BlockInner[src]

impl Serialize for BlockInner[src]

impl StructuralEq for BlockInner[src]

impl StructuralPartialEq for BlockInner[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.