Trait zenoh_plugin_trait::Plugin

source ·
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§

source

const DEFAULT_NAME: &'static str

Plugins’ default name when statically linked.

source

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.

source

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§

source

fn start(name: &str, args: &Self::StartArgs) -> ZResult<Self::Instance>

Starts your plugin. Use Ok to return your plugin’s control structure

Object Safety§

This trait is not object safe.

Implementors§