imag/src/module/mod.rs

24 lines
469 B
Rust
Raw Normal View History

2015-10-19 15:54:32 +00:00
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<Self>;
fn callnames() -> [String];
fn name(&self) -> String;
fn execute(&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;
}