Type Definition dygpi::plugin::PluginRegistrationFn [−][src]
pub type PluginRegistrationFn<T> = fn(registrar: &mut PluginRegistrar<T>);
Expand description
The type for the registration function that a plugin provider MUST include in their library. This function constructs plugin instances and uses the registrar as a callback into the plugin manager.
use dygpi::plugin::PluginRegistrar; #[no_mangle] pub extern "C" fn register_plugins<MyPlugin>(registrar: &mut PluginRegistrar<SoundEffectPlugin>) { registrar.register(SoundEffectPlugin::new(PLUGIN_ID)); }