Struct zenoh_config::PluginsConfig
source · pub struct PluginsConfig { /* private fields */ }
Expand description
This part of the configuration is highly dynamic (any serde_json::Value
may be put in there), but should follow this scheme:
plugins: {
// `plugin_name` must be unique per configuration, and will be used to find the appropriate
// dynamic library to load if no `__path__` is specified
[plugin_name]: {
// Defaults to `false`. Setting this to `true` does 2 things:
// * If `zenohd` fails to locate the requested plugin, it will crash instead of logging an error.
// * Plugins are expected to check this value to set their panic-behaviour: plugins are encouraged
// to panic upon non-recoverable errors if their `__required__` flag is set to `true`, and to
// simply log them otherwise
__required__: bool,
// The path(s) where the plugin is expected to be located.
// If none is specified, `zenohd` will search for a `<dylib_prefix>zenoh_plugin_<plugin_name>.<dylib_suffix>` file in the search directories.
// If any path is specified, file-search will be disabled, and the first path leading to
// an existing file will be used
__path__: string | [string],
// [plugin_name] may require additional configuration
...
}
}
Implementations§
source§impl PluginsConfig
impl PluginsConfig
pub fn sift_privates(&mut self)
pub fn load_requests(&self) -> impl Iterator<Item = PluginLoad> + '_
pub fn remove(&mut self, key: &str) -> ZResult<()>
Trait Implementations§
source§impl Clone for PluginsConfig
impl Clone for PluginsConfig
source§fn clone(&self) -> PluginsConfig
fn clone(&self) -> PluginsConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PluginsConfig
impl Debug for PluginsConfig
source§impl Default for PluginsConfig
impl Default for PluginsConfig
source§impl<'a> Deserialize<'a> for PluginsConfig
impl<'a> Deserialize<'a> for PluginsConfig
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for PluginsConfig
impl Serialize for PluginsConfig
source§impl ValidatedMap for PluginsConfig
impl ValidatedMap for PluginsConfig
fn insert<'d, D: Deserializer<'d>>( &mut self, key: &str, deserializer: D ) -> Result<(), InsertionError>
fn get<'a>(&'a self, key: &str) -> Result<&'a dyn Any, GetError>
type Keys = Vec<String>
fn keys(&self) -> Self::Keys
fn get_json(&self, key: &str) -> Result<String, GetError>
fn insert_json5(&mut self, key: &str, value: &str) -> Result<(), InsertionError>
source§impl<'a> ValidatedMapAssociatedTypes<'a> for PluginsConfig
impl<'a> ValidatedMapAssociatedTypes<'a> for PluginsConfig
Auto Trait Implementations§
impl Freeze for PluginsConfig
impl !RefUnwindSafe for PluginsConfig
impl Send for PluginsConfig
impl Sync for PluginsConfig
impl Unpin for PluginsConfig
impl !UnwindSafe for PluginsConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more