Skip to main content

PluginConfigKey

Trait PluginConfigKey 

Source
pub trait PluginConfigKey:
    'static
    + Send
    + Sync {
    type Config: Default + Clone + Serialize + DeserializeOwned + JsonSchema + Send + Sync + 'static;

    const KEY: &'static str;
}
Expand description

Typed plugin configuration key.

Binds a string key to a concrete config type at compile time.

struct PermissionConfigKey;
impl PluginConfigKey for PermissionConfigKey {
    const KEY: &'static str = "permission";
    type Config = PermissionConfig;
}

Required Associated Constants§

Source

const KEY: &'static str

Section key in the sections map.

Required Associated Types§

Source

type Config: Default + Clone + Serialize + DeserializeOwned + JsonSchema + Send + Sync + 'static

Typed configuration value.

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.

Implementations on Foreign Types§

Source§

impl PluginConfigKey for DeferredToolsConfigKey

Source§

const KEY: &'static str = "deferred_tools"

Source§

type Config = DeferredToolsConfig

Implementors§