Skip to main content

ModuleMeta

Trait ModuleMeta 

Source
pub trait ModuleMeta {
    type Config: Default;

    const MODULE_NAME: &'static str;

    // Required methods
    fn migrations() -> &'static [(u32, MigrationUp)];
    fn __module_new(config: Self::Config) -> Self
       where Self: Sized;
}
Expand description

Metadata for module bootstrap. Generated by #[module(name, config, migrations)].

Enables run_module_main!(MyModule) with all params inferred from the attribute.

Required Associated Constants§

Source

const MODULE_NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn migrations() -> &'static [(u32, MigrationUp)]

Source

fn __module_new(config: Self::Config) -> Self
where Self: Sized,

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§