Skip to main content

PluginOptions

Trait PluginOptions 

Source
pub trait PluginOptions {
    // Required methods
    fn name(&self) -> &str;
    fn deps(&self) -> Vec<&str>;
    fn install(&mut self, event: Arc<Mutex<EventDispatcher>>);
    fn dispose(&mut self, event: Arc<Mutex<EventDispatcher>>);
}

Required Methods§

Source

fn name(&self) -> &str

插件的名字

Source

fn deps(&self) -> Vec<&str>

插件的依赖,依赖值为插件名字

Source

fn install(&mut self, event: Arc<Mutex<EventDispatcher>>)

插件的安装方法

Source

fn dispose(&mut self, event: Arc<Mutex<EventDispatcher>>)

插件的销毁方法

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§