Implement Module for TodoModule

This commit is contained in:
Matthias Beyer 2015-10-24 18:43:22 +02:00
parent 911384331b
commit 4d83b7c63f

View file

@ -1,25 +1,36 @@
use runtime::Runtime;
use module::Module;
use module::ModuleResult;
use std::path::Path;
use std::error::Error;
use std::result::Result;
pub struct TodoModule {
path: Option<String>,
}
const CALLNAMES : &'static [&'static str] = &[ "todo" ];
impl Module for TodoModule {
fn new(&rt : Runtime) -> TodoModule {
fn new(rt : &Runtime) -> TodoModule {
TodoModule {
path: None
}
}
fn name(&self) -> String {
"Todo".to_string()
fn callnames() -> &'static [&'static str] {
CALLNAMES
}
fn execute(&self, rt : &Runtime) -> Option<Error> {
( )
fn name(&self) -> &'static str{
"Todo"
}
fn execute(&self, rt : &Runtime) -> ModuleResult {
Ok(())
}
fn shutdown(&self, rt : &Runtime) -> ModuleResult {
Ok(())
}
}