Skip to main content

ModuleMeta

Trait ModuleMeta 

Source
pub trait ModuleMeta: 'static {
    const NAME: &'static str;

    // Provided method
    fn dependencies() -> &'static [(&'static str, TypeId)] { ... }
}
Expand description

Metadata trait for module registration.

Required Associated Constants§

Source

const NAME: &'static str

The diagnostic name of this module.

Provided Methods§

Source

fn dependencies() -> &'static [(&'static str, TypeId)]

Returns (name, TypeId) pairs for modules this module depends on.

Defaults to an empty slice — modules with no dependencies do not need to override this method.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§