Skip to main content

PluginContextExt

Trait PluginContextExt 

Source
pub trait PluginContextExt: PluginContext {
    // Provided methods
    fn config_as_json(&self) -> Option<Value> { ... }
    fn config_as<T>(&self) -> Result<T, PluginError>
       where T: DeserializeOwned { ... }
}

Provided Methods§

Source

fn config_as_json(&self) -> Option<Value>

解析插件配置为 JSON Value(基于 config

Source

fn config_as<T>(&self) -> Result<T, PluginError>

解析插件配置到指定类型(基于 config_json

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§