plugin_test_plugins/english/
mod.rs

1use plugin_api::{PluginInformation,SayHello};
2
3pub struct PluginMetadataType;
4
5pub const PLUGIN_METADATA: PluginMetadataType = PluginMetadataType;
6
7impl PluginInformation for PluginMetadataType {
8  fn name(&self) -> String {
9    "english".to_string()
10  }
11
12  fn get_instance(&self) -> Box<SayHello> {
13    Box::new(English)
14  }
15}
16
17pub struct English;
18
19impl SayHello for English {
20  fn say_hello(&self) -> String {
21    "hello, world".to_string()
22  }
23}