diff --git a/src/module.rs b/src/module.rs deleted file mode 100644 index 0897190f..00000000 --- a/src/module.rs +++ /dev/null @@ -1,12 +0,0 @@ -use runtime::Runtime; -use std::error::Error; - -pub trait Module { - - fn load(&self, &rt : Runtime) -> Self; - fn name(&self) -> String; - - fn execute(&self, &rt : Runtime) -> Option; - fn shutdown(&self, &rt : Runtime) -> Option; - -} diff --git a/src/module/mod.rs b/src/module/mod.rs new file mode 100644 index 00000000..5298fae9 --- /dev/null +++ b/src/module/mod.rs @@ -0,0 +1,23 @@ +pub use runtime::Runtime; +pub use std::error::Error; +pub use std::fs::Path; + +pub use module::todo::TodoModule; + +pub trait Module { + + fn load(&self, &rt : Runtime) -> Option; + fn callnames() -> [String]; + fn name(&self) -> String; + + fn execute(&self, &rt : Runtime) -> Option; + fn shutdown(&self, &rt : Runtime) -> Option; + +} + +pub trait TouchingModule : Module { + + fn load_with_path(&self, rt : &Runtime, path : &Path) -> Self; + +} +