pub trait Module {
type Error: Error + 'static;
type Event: Event + 'static;
type Parameters: Parameters + 'static;
const NAME: &'static str;
const VERSION: u32 = 1u32;
// Provided methods
fn params() -> Self::Parameters { ... }
fn set_params(params: Self::Parameters) { ... }
}
Expand description
A runtime module.
Required Associated Constants§
Provided Associated Constants§
Required Associated Types§
Sourcetype Parameters: Parameters + 'static
type Parameters: Parameters + 'static
Module parameters.
Provided Methods§
Sourcefn params() -> Self::Parameters
fn params() -> Self::Parameters
Return the module’s parameters.
Sourcefn set_params(params: Self::Parameters)
fn set_params(params: Self::Parameters)
Set the module’s parameters.
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.