pub struct FeaturesModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + Clone + 'static,
{ /* private fields */ }

Implementations§

source§

impl<T, BigInt, BigUint> FeaturesModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + Clone + 'static,

source

pub fn new(api: T) -> Self

Trait Implementations§

source§

impl<T, BigInt, BigUint> CallableContract<T> for FeaturesModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + Clone + 'static,

source§

fn call(&self, fn_name: &[u8]) -> bool

source§

fn abi(&self, include_modules: bool) -> ContractAbi

source§

fn clone_contract(&self) -> Box<dyn CallableContract<T>>

source§

fn into_api(self: Box<Self>) -> T

source§

impl<T, BigInt, BigUint> ContractHookApi<BigInt, BigUint> for FeaturesModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + Clone + 'static,

source§

fn get_sc_address(&self) -> Address

source§

fn get_owner_address(&self) -> Address

source§

fn get_caller(&self) -> Address

source§

fn get_balance(&self, address: &Address) -> BigUint

source§

fn storage_store_slice_u8(&self, key: &[u8], value: &[u8])

source§

fn storage_load_vec_u8(&self, key: &[u8]) -> Vec<u8>

source§

fn storage_load_len(&self, key: &[u8]) -> usize

source§

fn storage_store_bytes32(&self, key: &[u8], value: &[u8; 32])

source§

fn storage_load_bytes32(&self, key: &[u8]) -> [u8; 32]

source§

fn storage_store_big_uint(&self, key: &[u8], value: &BigUint)

source§

fn storage_load_big_uint(&self, key: &[u8]) -> BigUint

source§

fn storage_store_big_uint_raw(&self, key: &[u8], handle: i32)

source§

fn storage_load_big_uint_raw(&self, key: &[u8]) -> i32

source§

fn storage_store_big_int(&self, key: &[u8], value: &BigInt)

source§

fn storage_load_big_int(&self, key: &[u8]) -> BigInt

source§

fn storage_store_i64(&self, key: &[u8], value: i64)

source§

fn storage_store_u64(&self, key: &[u8], value: u64)

source§

fn storage_load_i64(&self, key: &[u8]) -> i64

source§

fn storage_load_u64(&self, key: &[u8]) -> u64

source§

fn get_call_value_big_uint(&self) -> BigUint

source§

fn get_dct_value_big_uint(&self) -> BigUint

source§

fn get_dct_token_name(&self) -> Vec<u8>

source§

fn send_tx(&self, to: &Address, amount: &BigUint, data: &[u8])

source§

fn async_call(&self, to: &Address, amount: &BigUint, data: &[u8])

source§

fn deploy_contract( &self, gas: u64, amount: &BigUint, code: &BoxedBytes, code_metadata: CodeMetadata, arg_buffer: &ArgBuffer ) -> Address

source§

fn get_tx_hash(&self) -> H256

source§

fn get_gas_left(&self) -> u64

source§

fn get_block_timestamp(&self) -> u64

source§

fn get_block_nonce(&self) -> u64

source§

fn get_block_round(&self) -> u64

source§

fn get_block_epoch(&self) -> u64

source§

fn get_block_random_seed(&self) -> Box<[u8; 48]>

source§

fn get_prev_block_timestamp(&self) -> u64

source§

fn get_prev_block_nonce(&self) -> u64

source§

fn get_prev_block_round(&self) -> u64

source§

fn get_prev_block_epoch(&self) -> u64

source§

fn get_prev_block_random_seed(&self) -> Box<[u8; 48]>

source§

fn sha256(&self, data: &[u8]) -> H256

source§

fn keccak256(&self, data: &[u8]) -> H256

source§

fn get_sc_balance(&self) -> BigUint

source§

fn storage_load_boxed_bytes(&self, key: &[u8]) -> BoxedBytes

source§

fn storage_load_cumulated_validator_reward(&self) -> BigUint

source§

impl<T, BigInt, BigUint> FeaturesModule<T, BigInt, BigUint> for FeaturesModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ContractIOApi<BigInt, BigUint> + Clone + 'static,

source§

fn get_feature_flag(&self, feature_name: FeatureName<'_>) -> u8

source§

fn set_feature_flag(&self, feature_name: FeatureName<'_>, value: u8)

source§

fn contract_proxy( &self, address: &Address ) -> Box<OtherContractHandle<T, BigInt, BigUint>>

source§

fn callback(&self)

source§

fn check_feature_on( &self, feature_name: &'static [u8], default: bool ) -> SCResult<()>

source§

fn set_feature_flag_endpoint( &self, feature_name: Vec<u8>, value: bool ) -> SCResult<()>

Auto Trait Implementations§

§

impl<T, BigInt, BigUint> RefUnwindSafe for FeaturesModuleImpl<T, BigInt, BigUint>
where BigInt: RefUnwindSafe, BigUint: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, BigInt, BigUint> Send for FeaturesModuleImpl<T, BigInt, BigUint>
where BigInt: Send, BigUint: Send, T: Send,

§

impl<T, BigInt, BigUint> Sync for FeaturesModuleImpl<T, BigInt, BigUint>
where BigInt: Sync, BigUint: Sync, T: Sync,

§

impl<T, BigInt, BigUint> Unpin for FeaturesModuleImpl<T, BigInt, BigUint>
where BigInt: Unpin, BigUint: Unpin, T: Unpin,

§

impl<T, BigInt, BigUint> UnwindSafe for FeaturesModuleImpl<T, BigInt, BigUint>
where BigInt: UnwindSafe, BigUint: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.