Trait RegisteredModule

Source
pub trait RegisteredModule {
    type InitMsg: Serialize;

    // Required methods
    fn module_id<'a>() -> &'a str;
    fn module_version<'a>() -> &'a str;
    fn dependencies<'a>() -> &'a [StaticDependency];

    // Provided method
    fn installed_module_contract_id(account_id: &AccountId) -> String { ... }
}
Expand description

Trait to access module information tied directly to the type.

Required Associated Types§

Source

type InitMsg: Serialize

The init message for the module.

Required Methods§

Source

fn module_id<'a>() -> &'a str

The id of the module.

Source

fn module_version<'a>() -> &'a str

The version of the module.

Source

fn dependencies<'a>() -> &'a [StaticDependency]

Dependencies of the module

Provided Methods§

Source

fn installed_module_contract_id(account_id: &AccountId) -> String

Create the unique contract ID for a module installed on an Account.

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.

Implementors§