pub trait StateDbExt {
    // Required methods
    fn get<T>(&self, key: StorageKeyWithSpace<'_>) -> Result<Option<T>>
       where T: Decodable;
    fn set<T>(
        &mut self,
        key: StorageKeyWithSpace<'_>,
        value: &T,
        debug_record: Option<&mut ComputeEpochDebugRecord>
    ) -> Result<()>
       where T: Encodable + IsDefault;
    fn get_account(&self, address: &AddressWithSpace) -> Result<Option<Account>>;
    fn get_code(
        &self,
        address: &AddressWithSpace,
        code_hash: &H256
    ) -> Result<Option<CodeInfo>>;
    fn get_deposit_list(
        &self,
        address: &AddressWithSpace
    ) -> Result<Option<DepositList>>;
    fn get_vote_list(
        &self,
        address: &AddressWithSpace
    ) -> Result<Option<VoteStakeList>>;
    fn get_system_storage(&self, key: &[u8]) -> Result<U256>;
    fn get_global_param<T: GlobalParamKey>(&self) -> Result<U256>;
    fn set_global_param<T: GlobalParamKey>(
        &mut self,
        value: &U256,
        debug_record: Option<&mut ComputeEpochDebugRecord>
    ) -> Result<()>;
    fn is_initialized(&self) -> Result<bool>;
}

Required Methods§

source

fn get<T>(&self, key: StorageKeyWithSpace<'_>) -> Result<Option<T>>
where T: Decodable,

source

fn set<T>( &mut self, key: StorageKeyWithSpace<'_>, value: &T, debug_record: Option<&mut ComputeEpochDebugRecord> ) -> Result<()>
where T: Encodable + IsDefault,

source

fn get_account(&self, address: &AddressWithSpace) -> Result<Option<Account>>

source

fn get_code( &self, address: &AddressWithSpace, code_hash: &H256 ) -> Result<Option<CodeInfo>>

source

fn get_deposit_list( &self, address: &AddressWithSpace ) -> Result<Option<DepositList>>

source

fn get_vote_list( &self, address: &AddressWithSpace ) -> Result<Option<VoteStakeList>>

source

fn get_system_storage(&self, key: &[u8]) -> Result<U256>

source

fn get_global_param<T: GlobalParamKey>(&self) -> Result<U256>

source

fn set_global_param<T: GlobalParamKey>( &mut self, value: &U256, debug_record: Option<&mut ComputeEpochDebugRecord> ) -> Result<()>

source

fn is_initialized(&self) -> Result<bool>

Object Safety§

This trait is not object safe.

Implementors§