Module

Trait Module 

Source
pub trait Module {
    // Required method
    fn id() -> ContractId
       where Self: Sized;

    // Provided method
    fn module_id(&self) -> ContractId
       where Self: Sized { ... }
}
Expand description

The trait that host modules uses to defines their own ID for both host and hosted environment

Required Methods§

Source

fn id() -> ContractId
where Self: Sized,

Returns the id that identifies this module

Provided Methods§

Source

fn module_id(&self) -> ContractId
where Self: Sized,

Returns the module’s id from the object instance

Implementors§