Enum near_primitives::state_record::StateRecord[][src]

pub enum StateRecord {
    Account {
        account_id: AccountId,
        account: Account,
    },
    Data {
        account_id: AccountId,
        data_key: Vec<u8>,
        value: Vec<u8>,
    },
    Contract {
        account_id: AccountId,
        code: Vec<u8>,
    },
    AccessKey {
        account_id: AccountId,
        public_key: PublicKey,
        access_key: AccessKey,
    },
    PostponedReceipt(Box<Receipt>),
    ReceivedData {
        account_id: AccountId,
        data_id: CryptoHash,
        data: Option<Vec<u8>>,
    },
    DelayedReceipt(Box<Receipt>),
}

Record in the state storage.

Variants

Account

Account information.

Fields of Account

account_id: AccountIdaccount: Account
Data

Data records inside the contract, encoded in base64.

Fields of Data

account_id: AccountIddata_key: Vec<u8>value: Vec<u8>
Contract

Contract code encoded in base64.

Fields of Contract

account_id: AccountIdcode: Vec<u8>
AccessKey

Access key associated with some account.

Fields of AccessKey

account_id: AccountIdpublic_key: PublicKeyaccess_key: AccessKey
PostponedReceipt(Box<Receipt>)

Postponed Action Receipt.

ReceivedData

Received data from DataReceipt encoded in base64 for the given account_id and data_id.

Fields of ReceivedData

account_id: AccountIddata_id: CryptoHashdata: Option<Vec<u8>>
DelayedReceipt(Box<Receipt>)

Delayed Receipt. The receipt was delayed because the shard was overwhelmed.

Implementations

impl StateRecord[src]

pub fn from_raw_key_value(key: Vec<u8>, value: Vec<u8>) -> Option<StateRecord>[src]

NOTE: This function is not safe to be running during block production. It contains a lot of unwrap and should only be used during state_dump. Most unwrap() here are because the implementation of columns and data are internal and can’t be influenced by external calls.

Trait Implementations

impl Clone for StateRecord[src]

impl Debug for StateRecord[src]

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

impl Display for StateRecord[src]

impl Serialize for StateRecord[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> ToString for T where
    T: Display + ?Sized
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,