Skip to main content

SettingsRegistrar

Trait SettingsRegistrar 

pub trait SettingsRegistrar {
    // Required method
    fn register_setting(
        &mut self,
        setting: SettingSpec,
    ) -> Result<(), SettingError>;
}
Expand description

Registrar operations for settings.

Required Methods§

fn register_setting(&mut self, setting: SettingSpec) -> Result<(), SettingError>

Register a setting shown on the calling mod’s page in Options > Mods (NeoForge’s ModConfigSpec entries). Called from Hooks::register; client settings only. A setting SettingSpec::check refuses, or a key the mod registered already, is not registered and comes back as the error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§