[][src]Struct pallet_contracts::RawAliveContractInfo

pub struct RawAliveContractInfo<CodeHash, Balance, BlockNumber> {
    pub trie_id: TrieId,
    pub storage_size: u32,
    pub empty_pair_count: u32,
    pub total_pair_count: u32,
    pub code_hash: CodeHash,
    pub rent_allowance: Balance,
    pub deduct_block: BlockNumber,
    pub last_write: Option<BlockNumber>,
}

Information for managing an account and its sub trie abstraction. This is the required info to cache for an account.

Fields

trie_id: TrieId

Unique ID for the subtree encoded as a bytes vector.

storage_size: u32

The total number of bytes used by this contract.

It is a sum of each key-value pair stored by this contract.

empty_pair_count: u32

The number of key-value pairs that have values of zero length. The condition empty_pair_count ≤ total_pair_count always holds.

total_pair_count: u32

The total number of key-value pairs in storage of this contract.

code_hash: CodeHash

The code associated with a given account.

rent_allowance: Balance

Pay rent at most up to this value.

deduct_block: BlockNumber

Last block rent has been payed.

last_write: Option<BlockNumber>

Last block child storage has been written.

Implementations

impl<CodeHash, Balance, BlockNumber> RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

pub fn child_trie_info(&self) -> ChildInfo[src]

Associated child trie unique id is built from the hash part of the trie id.

Trait Implementations

impl<CodeHash: Clone, Balance: Clone, BlockNumber: Clone> Clone for RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

impl<CodeHash, Balance, BlockNumber> Debug for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    CodeHash: Debug,
    Balance: Debug,
    BlockNumber: Debug
[src]

impl<CodeHash, Balance, BlockNumber> Decode for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    CodeHash: Decode,
    CodeHash: Decode,
    Balance: Decode,
    Balance: Decode,
    BlockNumber: Decode,
    BlockNumber: Decode,
    Option<BlockNumber>: Decode,
    Option<BlockNumber>: Decode, 
[src]

impl<CodeHash, Balance, BlockNumber> Encode for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    CodeHash: Encode,
    CodeHash: Encode,
    Balance: Encode,
    Balance: Encode,
    BlockNumber: Encode,
    BlockNumber: Encode,
    Option<BlockNumber>: Encode,
    Option<BlockNumber>: Encode, 
[src]

impl<CodeHash, Balance, BlockNumber> EncodeLike<RawAliveContractInfo<CodeHash, Balance, BlockNumber>> for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    CodeHash: Encode,
    CodeHash: Encode,
    Balance: Encode,
    Balance: Encode,
    BlockNumber: Encode,
    BlockNumber: Encode,
    Option<BlockNumber>: Encode,
    Option<BlockNumber>: Encode, 
[src]

impl<CodeHash: Eq, Balance: Eq, BlockNumber: Eq> Eq for RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

impl<T: Trait> From<RawAliveContractInfo<<T as Trait>::Hash, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, <T as Trait>::BlockNumber>> for ContractInfo<T>[src]

impl<CodeHash: PartialEq, Balance: PartialEq, BlockNumber: PartialEq> PartialEq<RawAliveContractInfo<CodeHash, Balance, BlockNumber>> for RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

impl<CodeHash, Balance, BlockNumber> StructuralEq for RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

impl<CodeHash, Balance, BlockNumber> StructuralPartialEq for RawAliveContractInfo<CodeHash, Balance, BlockNumber>[src]

Auto Trait Implementations

impl<CodeHash, Balance, BlockNumber> RefUnwindSafe for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    Balance: RefUnwindSafe,
    BlockNumber: RefUnwindSafe,
    CodeHash: RefUnwindSafe

impl<CodeHash, Balance, BlockNumber> Send for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    Balance: Send,
    BlockNumber: Send,
    CodeHash: Send

impl<CodeHash, Balance, BlockNumber> Sync for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    Balance: Sync,
    BlockNumber: Sync,
    CodeHash: Sync

impl<CodeHash, Balance, BlockNumber> Unpin for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    Balance: Unpin,
    BlockNumber: Unpin,
    CodeHash: Unpin

impl<CodeHash, Balance, BlockNumber> UnwindSafe for RawAliveContractInfo<CodeHash, Balance, BlockNumber> where
    Balance: UnwindSafe,
    BlockNumber: UnwindSafe,
    CodeHash: UnwindSafe

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> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Encode + Decode, 

impl<T, X> Decode for X where
    T: Decode + Into<X>,
    X: WrapperTypeDecode<Wrapped = T>, 

impl<T> DecodeAll for T where
    T: Decode, 

impl<T> DecodeLimit for T where
    T: Decode, 

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

impl<T, X> Encode for X where
    T: Encode + ?Sized,
    X: WrapperTypeEncode<Target = T>, 

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode, 

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode, 

impl<T> EncodeLike<Box<T>> for T where
    T: Encode, 

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode, 

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<S> FullCodec for S where
    S: Decode + FullEncode, 

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 

impl<T> Hashable for T where
    T: Codec, 
[src]

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

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

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec, 

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Parameter for T where
    T: Codec + EncodeLike<T> + Clone + Eq + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

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