pub trait Addon {
// Required methods
fn title(&self) -> &'static str;
fn module(&mut self, name: &str) -> Result<Box<dyn Module>, String>;
// Provided methods
fn _name(&self) -> String { ... }
fn icon(&self) -> &'static str { ... }
fn description(&self) -> &'static str { ... }
fn pages(&self) -> &'static str { ... }
fn sort(&self) -> usize { ... }
fn tools(&mut self) -> Tools { ... }
}Expand description
插件接口