ab_system_contract_address_allocator

Trait AddressAllocatorExt

Source
pub trait AddressAllocatorExt {
    // Required methods
    fn address_allocator_new(
        self: &&mut Self,
        method_context: &MethodContext,
        contract: &Address,
    ) -> Result<(), ContractError>;
    fn address_allocator_allocate_address(
        self: &&mut Self,
        method_context: &MethodContext,
        contract: &Address,
    ) -> Result<Address, ContractError>;
}
Expand description

Extension trait that provides helper methods for calling AddressAllocator’s methods on Env for convenience purposes

Required Methods§

Source

fn address_allocator_new( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<(), ContractError>

Source

fn address_allocator_allocate_address( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<Address, 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.

Implementations on Foreign Types§

Source§

impl AddressAllocatorExt for Env

Source§

fn address_allocator_new( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<(), ContractError>

Source§

fn address_allocator_allocate_address( self: &&mut Self, method_context: &MethodContext, contract: &Address, ) -> Result<Address, ContractError>

Implementors§