pub struct UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,{ /* private fields */ }Implementations§
source§impl<T, BigInt, BigUint> UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
impl<T, BigInt, BigUint> UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
Trait Implementations§
source§impl<T, BigInt, BigUint> CallableContract<T> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
impl<T, BigInt, BigUint> CallableContract<T> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
source§impl<T, BigInt, BigUint> ContractSelfApi<BigInt, BigUint> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
impl<T, BigInt, BigUint> ContractSelfApi<BigInt, BigUint> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
§type Storage = <T as ContractSelfApi<BigInt, BigUint>>::Storage
type Storage = <T as ContractSelfApi<BigInt, BigUint>>::Storage
Abstracts the lower-level storage functionality.
§type CallValue = <T as ContractSelfApi<BigInt, BigUint>>::CallValue
type CallValue = <T as ContractSelfApi<BigInt, BigUint>>::CallValue
Abstracts the call value handling at the beginning of a function call.
§type SendApi = <T as ContractSelfApi<BigInt, BigUint>>::SendApi
type SendApi = <T as ContractSelfApi<BigInt, BigUint>>::SendApi
Abstracts the sending of MOAX & DCT transactions, as well as async calls.
type BlockchainApi = <T as ContractSelfApi<BigInt, BigUint>>::BlockchainApi
type CryptoApi = <T as ContractSelfApi<BigInt, BigUint>>::CryptoApi
source§fn get_storage_raw(&self) -> Self::Storage
fn get_storage_raw(&self) -> Self::Storage
Gateway into the lower-level storage functionality.
Storage related annotations make use of this.
Using it directly is not recommended.
source§fn call_value(&self) -> Self::CallValue
fn call_value(&self) -> Self::CallValue
Gateway into the call value retrieval functionality.
The payment annotations should normally be the ones to handle this,
but the developer is also given direct access to the API.
source§fn send(&self) -> Self::SendApi
fn send(&self) -> Self::SendApi
Gateway to the functionality related to sending transactions from the current contract.
source§fn blockchain(&self) -> Self::BlockchainApi
fn blockchain(&self) -> Self::BlockchainApi
Gateway blockchain info related to the current transaction and to accounts.
source§fn storage_load_cumulated_validator_reward(&self) -> BigUint
fn storage_load_cumulated_validator_reward(&self) -> BigUint
Retrieves validator rewards, as set by the protocol.
TODO: move to the storage API, once BigUint gets refactored
source§impl<T, BigInt, BigUint> ContractWithAbi for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
impl<T, BigInt, BigUint> ContractWithAbi for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
§type Storage = <T as ContractSelfApi<BigInt, BigUint>>::Storage
type Storage = <T as ContractSelfApi<BigInt, BigUint>>::Storage
The generated ABI generation code sometimes references the contract storage manager type,
e.g. with storage mappers.
source§fn abi(&self, include_modules: bool) -> ContractAbi
fn abi(&self, include_modules: bool) -> ContractAbi
Generate a raw ABI object.
Contracts would not call this function, so it never ends up in the wasm bytecode.
It is, however, still no_std.
source§impl<T, BigInt, BigUint> UsersModule<T, BigInt, BigUint> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
impl<T, BigInt, BigUint> UsersModule<T, BigInt, BigUint> for UsersModuleImpl<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: ContractSelfApi<BigInt, BigUint> + ErrorApi + BlockchainApi<BigUint> + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + CryptoApi + LogApi + Clone + 'static,
fn get_user_id(&self, address: &Address) -> usize
fn set_user_id(&self, address: &Address, user_id: usize)
fn get_user_address(&self, user_id: usize) -> Address
fn set_user_address(&self, user_id: usize, address: &Address)
fn get_num_users(&self) -> usize
fn set_num_users(&self, num_users: usize)
fn callback(&self)
fn callbacks(&self) -> CallbackProxies<T, BigInt, BigUint>
fn get_or_create_user(&self, address: &Address) -> usize
fn update_user_address(&self, addresses: VarArgs<Address>) -> SCResult<()>
Auto Trait Implementations§
impl<T, BigInt, BigUint> RefUnwindSafe for UsersModuleImpl<T, BigInt, BigUint>
impl<T, BigInt, BigUint> Send for UsersModuleImpl<T, BigInt, BigUint>
impl<T, BigInt, BigUint> Sync for UsersModuleImpl<T, BigInt, BigUint>
impl<T, BigInt, BigUint> Unpin for UsersModuleImpl<T, BigInt, BigUint>
impl<T, BigInt, BigUint> UnwindSafe for UsersModuleImpl<T, BigInt, BigUint>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more