Created plugin trait and create function type
This commit is contained in:
parent
3e15195b0f
commit
bb2e167ef1
|
|
@ -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);
|
||||
}
|
||||
Loading…
Reference in New Issue