pub trait ExampleExt {
// Required methods
fn example_new(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
owner: &Address,
total_supply: &Balance,
) -> Result<(), ContractError>;
fn example_new_result(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
) -> Result<(), ContractError>;
fn example_mint(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
to: &Address,
value: &Balance,
) -> Result<(), ContractError>;
fn example_balance(
&self,
contract: &Address,
target: &Address,
) -> Result<Balance, ContractError>;
fn example_balance2(
&self,
contract: &Address,
target: &Address,
balance: &mut MaybeData<Balance>,
) -> Result<(), ContractError>;
fn example_balance3(
&self,
contract: &Address,
target: &Address,
result: &mut MaybeData<Balance>,
) -> Result<(), ContractError>;
fn example_var_bytes(
&self,
contract: &Address,
_out: &mut VariableBytes<1024>,
) -> Result<(), ContractError>;
fn example_transfer(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
from: &Address,
to: &Address,
amount: &Balance,
) -> Result<(), ContractError>;
fn example_last_action(
self: &&mut Self,
method_context: &MethodContext,
contract: &Address,
) -> Result<LastAction, ContractError>;
}
Expand description
Required Methods§
fn example_new( self: &&mut Self, method_context: &MethodContext, contract: &Address, owner: &Address, total_supply: &Balance, ) -> Result<(), ContractError>
fn example_new_result( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<(), ContractError>
fn example_mint( self: &&mut Self, method_context: &MethodContext, contract: &Address, to: &Address, value: &Balance, ) -> Result<(), ContractError>
fn example_balance( &self, contract: &Address, target: &Address, ) -> Result<Balance, ContractError>
fn example_balance2( &self, contract: &Address, target: &Address, balance: &mut MaybeData<Balance>, ) -> Result<(), ContractError>
fn example_balance3( &self, contract: &Address, target: &Address, result: &mut MaybeData<Balance>, ) -> Result<(), ContractError>
fn example_var_bytes( &self, contract: &Address, _out: &mut VariableBytes<1024>, ) -> Result<(), ContractError>
fn example_transfer( self: &&mut Self, method_context: &MethodContext, contract: &Address, from: &Address, to: &Address, amount: &Balance, ) -> Result<(), ContractError>
fn example_last_action( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<LastAction, ContractError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.