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§
Sourcefn id() -> ContractIdwhere
Self: Sized,
fn id() -> ContractIdwhere
Self: Sized,
Returns the id that identifies this module
Provided Methods§
Sourcefn module_id(&self) -> ContractIdwhere
Self: Sized,
fn module_id(&self) -> ContractIdwhere
Self: Sized,
Returns the module’s id from the object instance