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§
Sourcefn config_as_json(&self) -> Option<Value>
fn config_as_json(&self) -> Option<Value>
解析插件配置为 JSON Value(基于 config)
Sourcefn config_as<T>(&self) -> Result<T, PluginError>where
T: DeserializeOwned,
fn config_as<T>(&self) -> Result<T, PluginError>where
T: DeserializeOwned,
解析插件配置到指定类型(基于 config_json)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".