imag/src/module/mod.rs

20 lines
354 B
Rust
Raw Normal View History

2015-10-24 15:46:01 +00:00
use runtime::Runtime;
use std::error::Error;
use std::path::Path;
2015-10-19 15:54:32 +00:00
2015-10-24 15:46:01 +00:00
use module::todo::TodoModule;
mod todo;
2015-10-19 15:54:32 +00:00
pub trait Module {
2015-10-19 16:09:39 +00:00
fn new(&rt : Runtime) -> Self;
fn callnames() -> &'static [str];
fn name(&self) -> &'static str;
2015-10-19 15:54:32 +00:00
fn execute(&self, &rt : Runtime) -> Option<Error>;
fn shutdown(&self, &rt : Runtime) -> Option<Error>;
}