Rewrite
This commit is contained in:
parent
1cea0e48e0
commit
034d71b21d
1 changed files with 3 additions and 9 deletions
|
@ -6,18 +6,12 @@ pub use module::todo::TodoModule;
|
||||||
|
|
||||||
pub trait Module {
|
pub trait Module {
|
||||||
|
|
||||||
fn load(&self, &rt : Runtime) -> Option<Self>;
|
fn new(&rt : Runtime) -> Self;
|
||||||
fn callnames() -> [String];
|
fn callnames() -> &'static [str];
|
||||||
fn name(&self) -> String;
|
fn name(&self) -> &'static str;
|
||||||
|
|
||||||
fn execute(&self, &rt : Runtime) -> Option<Error>;
|
fn execute(&self, &rt : Runtime) -> Option<Error>;
|
||||||
fn shutdown(&self, &rt : Runtime) -> Option<Error>;
|
fn shutdown(&self, &rt : Runtime) -> Option<Error>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TouchingModule : Module {
|
|
||||||
|
|
||||||
fn load_with_path(&self, rt : &Runtime, path : &Path) -> Self;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue