Skip to main content

PluginConfigAPI

Trait PluginConfigAPI 

Source
pub trait PluginConfigAPI: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Option<Value>;
    fn set(&self, key: &str, value: Value);
    fn get_all(&self) -> HashMap<String, Value>;
    fn has(&self, key: &str) -> bool;
    fn delete(&self, key: &str);
}
Expand description

插件配置 API

Required Methods§

Source

fn get(&self, key: &str) -> Option<Value>

获取配置值

Source

fn set(&self, key: &str, value: Value)

设置配置值

Source

fn get_all(&self) -> HashMap<String, Value>

获取所有配置

Source

fn has(&self, key: &str) -> bool

检查是否存在

Source

fn delete(&self, key: &str)

删除配置

Implementors§