Trait Addon

Source
pub trait Addon {
    // Required methods
    fn model(&mut self, name: &str) -> Box<dyn Model>;
    fn title(&mut self) -> &'static str;
    fn name(&mut self) -> &'static str;

    // Provided methods
    fn sort(&mut self) -> usize { ... }
    fn describe(&mut self) -> &'static str { ... }
    fn icon(&mut self) -> &'static str { ... }
    fn mode(&mut self) -> Vec<&'static str> { ... }
}
Expand description

插件

Required Methods§

Source

fn model(&mut self, name: &str) -> Box<dyn Model>

模型入口

Source

fn title(&mut self) -> &'static str

插件标题

Source

fn name(&mut self) -> &'static str

插件名称

Provided Methods§

Source

fn sort(&mut self) -> usize

排序

Source

fn describe(&mut self) -> &'static str

插件描述

Source

fn icon(&mut self) -> &'static str

图标

Source

fn mode(&mut self) -> Vec<&'static str>

插件适合模式 org|admin|user

Implementors§