plugin_test_plugins/french/
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    "français".to_string()
10  }
11
12  fn get_instance(&self) -> Box<SayHello> {
13    Box::new(French)
14  }
15}
16
17pub struct French;
18
19impl SayHello for French {
20  fn say_hello(&self) -> String {
21    "Bonjour, tout le monde".to_string()
22  }
23}