pub trait Plugin: Sized + 'static {
type StartArgs: PluginStartArgs;
type Instance: PluginInstance;
const DEFAULT_NAME: &'static str;
const PLUGIN_VERSION: &'static str;
const PLUGIN_LONG_VERSION: &'static str;
// Required method
fn start(name: &str, args: &Self::StartArgs) -> ZResult<Self::Instance>;
}
Expand description
Base plugin trait. The loaded plugin
Required Associated Constants§
Sourceconst DEFAULT_NAME: &'static str
const DEFAULT_NAME: &'static str
Plugins’ default name when statically linked.
Sourceconst PLUGIN_VERSION: &'static str
const PLUGIN_VERSION: &'static str
Plugin’s version. Used only for information purposes. It’s recommended to use plugin_version! macro to generate this string.
Sourceconst PLUGIN_LONG_VERSION: &'static str
const PLUGIN_LONG_VERSION: &'static str
Plugin’s long version (with git commit hash). Used only for information purposes. It’s recommended to use plugin_version! macro to generate this string.
Required Associated Types§
Required Methods§
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.