Created plugin trait and create function type

This commit is contained in:
michael-bailey 2022-03-13 17:13:00 +00:00
parent 3e15195b0f
commit bb2e167ef1
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
use std::sync::Arc;
type CreatePluginFn = dyn Fn() -> Arc<dyn Plugin>;
pub trait Plugin {
fn name(&self) -> String;
fn init(&self);
}