pub trait UsersModule<T, BigInt, BigUint>: ContractSelfApi<BigInt, BigUint> + Sizedwhere
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,{
// Required methods
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>;
// Provided methods
fn get_or_create_user(&self, address: &Address) -> usize { ... }
fn update_user_address(&self, addresses: VarArgs<Address>) -> SCResult<()> { ... }
}Required Methods§
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>
Provided Methods§
fn get_or_create_user(&self, address: &Address) -> usize
fn update_user_address(&self, addresses: VarArgs<Address>) -> SCResult<()>
Object Safety§
This trait is not object safe.