diff --git a/Cargo.lock b/Cargo.lock index 17c38bc575..c115f80499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4986,7 +4986,7 @@ version = "0.11.0-dev" dependencies = [ "async-std", "async-trait", - "clap 3.2.25", + "clap", "env_logger", "futures", "log", diff --git a/zenoh/src/plugins/sealed.rs b/zenoh/src/plugins/sealed.rs index 7e790270e0..8adbde4162 100644 --- a/zenoh/src/plugins/sealed.rs +++ b/zenoh/src/plugins/sealed.rs @@ -14,27 +14,24 @@ //! `zenohd`'s plugin system. For more details, consult the [detailed documentation](https://github.com/eclipse-zenoh/roadmap/blob/main/rfcs/ALL/Plugins/Zenoh%20Plugins.md). -use crate::prelude::Selector; -pub use crate::runtime::Runtime; -pub use crate::Result as ZResult; +use crate::{prelude::Selector, runtime::Runtime}; use zenoh_core::zconfigurable; use zenoh_plugin_trait::{ Plugin, PluginControl, PluginInstance, PluginReport, PluginStatusRec, PluginStructVersion, }; use zenoh_protocol::core::key_expr::keyexpr; +use zenoh_result::ZResult; zconfigurable! { pub static ref PLUGIN_PREFIX: String = "zenoh_plugin_".to_string(); } -/// Zenoh plugins should implement this trait to ensure type-safety, even if the starting arguments and expected plugin types change in a future release. -pub trait ZenohPlugin: Plugin {} - -/// A zenoh plugin receives a reference to a value of this type when started. -pub type StartArgs = Runtime; /// A zenoh plugin, when started, must return this type. pub type RunningPlugin = Box; +/// Zenoh plugins should implement this trait to ensure type-safety, even if the starting arguments and expected plugin types change in a future release. +pub trait ZenohPlugin: Plugin {} + impl PluginStructVersion for RunningPlugin { fn struct_version() -> u64 { 1 @@ -98,4 +95,4 @@ pub trait RunningPluginTrait: Send + Sync + PluginControl { } /// The zenoh plugins manager. It handles the full lifetime of plugins, from loading to destruction. -pub type PluginsManager = zenoh_plugin_trait::PluginsManager; +pub type PluginsManager = zenoh_plugin_trait::PluginsManager;